terraform-provider-stackitp.../pkg/iaasbeta/model_v2beta1_create_snapshot_payload.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2026-01-29 14:10:25 +00:00

467 lines
17 KiB
Go

/*
STACKIT IaaS API
This API allows you to create and modify IaaS resources.
API version: 2beta1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package iaasbeta
import (
"encoding/json"
"time"
)
// checks if the V2beta1CreateSnapshotPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &V2beta1CreateSnapshotPayload{}
/*
types and functions for createdAt
*/
// isDateTime
type V2beta1CreateSnapshotPayloadGetCreatedAtAttributeType = *time.Time
type V2beta1CreateSnapshotPayloadGetCreatedAtArgType = time.Time
type V2beta1CreateSnapshotPayloadGetCreatedAtRetType = time.Time
func getV2beta1CreateSnapshotPayloadGetCreatedAtAttributeTypeOk(arg V2beta1CreateSnapshotPayloadGetCreatedAtAttributeType) (ret V2beta1CreateSnapshotPayloadGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setV2beta1CreateSnapshotPayloadGetCreatedAtAttributeType(arg *V2beta1CreateSnapshotPayloadGetCreatedAtAttributeType, val V2beta1CreateSnapshotPayloadGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type V2beta1CreateSnapshotPayloadGetIdAttributeType = *string
func getV2beta1CreateSnapshotPayloadGetIdAttributeTypeOk(arg V2beta1CreateSnapshotPayloadGetIdAttributeType) (ret V2beta1CreateSnapshotPayloadGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setV2beta1CreateSnapshotPayloadGetIdAttributeType(arg *V2beta1CreateSnapshotPayloadGetIdAttributeType, val V2beta1CreateSnapshotPayloadGetIdRetType) {
*arg = &val
}
type V2beta1CreateSnapshotPayloadGetIdArgType = string
type V2beta1CreateSnapshotPayloadGetIdRetType = string
/*
types and functions for labels
*/
// isFreeform
type V2beta1CreateSnapshotPayloadGetLabelsAttributeType = *map[string]interface{}
type V2beta1CreateSnapshotPayloadGetLabelsArgType = map[string]interface{}
type V2beta1CreateSnapshotPayloadGetLabelsRetType = map[string]interface{}
func getV2beta1CreateSnapshotPayloadGetLabelsAttributeTypeOk(arg V2beta1CreateSnapshotPayloadGetLabelsAttributeType) (ret V2beta1CreateSnapshotPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setV2beta1CreateSnapshotPayloadGetLabelsAttributeType(arg *V2beta1CreateSnapshotPayloadGetLabelsAttributeType, val V2beta1CreateSnapshotPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type V2beta1CreateSnapshotPayloadGetNameAttributeType = *string
func getV2beta1CreateSnapshotPayloadGetNameAttributeTypeOk(arg V2beta1CreateSnapshotPayloadGetNameAttributeType) (ret V2beta1CreateSnapshotPayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setV2beta1CreateSnapshotPayloadGetNameAttributeType(arg *V2beta1CreateSnapshotPayloadGetNameAttributeType, val V2beta1CreateSnapshotPayloadGetNameRetType) {
*arg = &val
}
type V2beta1CreateSnapshotPayloadGetNameArgType = string
type V2beta1CreateSnapshotPayloadGetNameRetType = string
/*
types and functions for size
*/
// isLong
type V2beta1CreateSnapshotPayloadGetSizeAttributeType = *int64
type V2beta1CreateSnapshotPayloadGetSizeArgType = int64
type V2beta1CreateSnapshotPayloadGetSizeRetType = int64
func getV2beta1CreateSnapshotPayloadGetSizeAttributeTypeOk(arg V2beta1CreateSnapshotPayloadGetSizeAttributeType) (ret V2beta1CreateSnapshotPayloadGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setV2beta1CreateSnapshotPayloadGetSizeAttributeType(arg *V2beta1CreateSnapshotPayloadGetSizeAttributeType, val V2beta1CreateSnapshotPayloadGetSizeRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type V2beta1CreateSnapshotPayloadGetStatusAttributeType = *string
func getV2beta1CreateSnapshotPayloadGetStatusAttributeTypeOk(arg V2beta1CreateSnapshotPayloadGetStatusAttributeType) (ret V2beta1CreateSnapshotPayloadGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setV2beta1CreateSnapshotPayloadGetStatusAttributeType(arg *V2beta1CreateSnapshotPayloadGetStatusAttributeType, val V2beta1CreateSnapshotPayloadGetStatusRetType) {
*arg = &val
}
type V2beta1CreateSnapshotPayloadGetStatusArgType = string
type V2beta1CreateSnapshotPayloadGetStatusRetType = string
/*
types and functions for updatedAt
*/
// isDateTime
type V2beta1CreateSnapshotPayloadGetUpdatedAtAttributeType = *time.Time
type V2beta1CreateSnapshotPayloadGetUpdatedAtArgType = time.Time
type V2beta1CreateSnapshotPayloadGetUpdatedAtRetType = time.Time
func getV2beta1CreateSnapshotPayloadGetUpdatedAtAttributeTypeOk(arg V2beta1CreateSnapshotPayloadGetUpdatedAtAttributeType) (ret V2beta1CreateSnapshotPayloadGetUpdatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setV2beta1CreateSnapshotPayloadGetUpdatedAtAttributeType(arg *V2beta1CreateSnapshotPayloadGetUpdatedAtAttributeType, val V2beta1CreateSnapshotPayloadGetUpdatedAtRetType) {
*arg = &val
}
/*
types and functions for volumeId
*/
// isNotNullableString
type V2beta1CreateSnapshotPayloadGetVolumeIdAttributeType = *string
func getV2beta1CreateSnapshotPayloadGetVolumeIdAttributeTypeOk(arg V2beta1CreateSnapshotPayloadGetVolumeIdAttributeType) (ret V2beta1CreateSnapshotPayloadGetVolumeIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setV2beta1CreateSnapshotPayloadGetVolumeIdAttributeType(arg *V2beta1CreateSnapshotPayloadGetVolumeIdAttributeType, val V2beta1CreateSnapshotPayloadGetVolumeIdRetType) {
*arg = &val
}
type V2beta1CreateSnapshotPayloadGetVolumeIdArgType = string
type V2beta1CreateSnapshotPayloadGetVolumeIdRetType = string
// V2beta1CreateSnapshotPayload Object that represents a snapshot.
type V2beta1CreateSnapshotPayload struct {
// Date-time when resource was created.
CreatedAt V2beta1CreateSnapshotPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Universally Unique Identifier (UUID).
Id V2beta1CreateSnapshotPayloadGetIdAttributeType `json:"id,omitempty"`
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
Labels V2beta1CreateSnapshotPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
Name V2beta1CreateSnapshotPayloadGetNameAttributeType `json:"name,omitempty"`
// Size in Gigabyte.
Size V2beta1CreateSnapshotPayloadGetSizeAttributeType `json:"size,omitempty"`
// The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`.
Status V2beta1CreateSnapshotPayloadGetStatusAttributeType `json:"status,omitempty"`
// Date-time when resource was last updated.
UpdatedAt V2beta1CreateSnapshotPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
// Universally Unique Identifier (UUID).
// REQUIRED
VolumeId V2beta1CreateSnapshotPayloadGetVolumeIdAttributeType `json:"volumeId" required:"true"`
}
type _V2beta1CreateSnapshotPayload V2beta1CreateSnapshotPayload
// NewV2beta1CreateSnapshotPayload instantiates a new V2beta1CreateSnapshotPayload object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewV2beta1CreateSnapshotPayload(volumeId V2beta1CreateSnapshotPayloadGetVolumeIdArgType) *V2beta1CreateSnapshotPayload {
this := V2beta1CreateSnapshotPayload{}
setV2beta1CreateSnapshotPayloadGetVolumeIdAttributeType(&this.VolumeId, volumeId)
return &this
}
// NewV2beta1CreateSnapshotPayloadWithDefaults instantiates a new V2beta1CreateSnapshotPayload object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewV2beta1CreateSnapshotPayloadWithDefaults() *V2beta1CreateSnapshotPayload {
this := V2beta1CreateSnapshotPayload{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *V2beta1CreateSnapshotPayload) GetCreatedAt() (res V2beta1CreateSnapshotPayloadGetCreatedAtRetType) {
res, _ = o.GetCreatedAtOk()
return
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V2beta1CreateSnapshotPayload) GetCreatedAtOk() (ret V2beta1CreateSnapshotPayloadGetCreatedAtRetType, ok bool) {
return getV2beta1CreateSnapshotPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *V2beta1CreateSnapshotPayload) HasCreatedAt() bool {
_, ok := o.GetCreatedAtOk()
return ok
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *V2beta1CreateSnapshotPayload) SetCreatedAt(v V2beta1CreateSnapshotPayloadGetCreatedAtRetType) {
setV2beta1CreateSnapshotPayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *V2beta1CreateSnapshotPayload) GetId() (res V2beta1CreateSnapshotPayloadGetIdRetType) {
res, _ = o.GetIdOk()
return
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V2beta1CreateSnapshotPayload) GetIdOk() (ret V2beta1CreateSnapshotPayloadGetIdRetType, ok bool) {
return getV2beta1CreateSnapshotPayloadGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *V2beta1CreateSnapshotPayload) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *V2beta1CreateSnapshotPayload) SetId(v V2beta1CreateSnapshotPayloadGetIdRetType) {
setV2beta1CreateSnapshotPayloadGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *V2beta1CreateSnapshotPayload) GetLabels() (res V2beta1CreateSnapshotPayloadGetLabelsRetType) {
res, _ = o.GetLabelsOk()
return
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V2beta1CreateSnapshotPayload) GetLabelsOk() (ret V2beta1CreateSnapshotPayloadGetLabelsRetType, ok bool) {
return getV2beta1CreateSnapshotPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *V2beta1CreateSnapshotPayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
func (o *V2beta1CreateSnapshotPayload) SetLabels(v V2beta1CreateSnapshotPayloadGetLabelsRetType) {
setV2beta1CreateSnapshotPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *V2beta1CreateSnapshotPayload) GetName() (res V2beta1CreateSnapshotPayloadGetNameRetType) {
res, _ = o.GetNameOk()
return
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V2beta1CreateSnapshotPayload) GetNameOk() (ret V2beta1CreateSnapshotPayloadGetNameRetType, ok bool) {
return getV2beta1CreateSnapshotPayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *V2beta1CreateSnapshotPayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *V2beta1CreateSnapshotPayload) SetName(v V2beta1CreateSnapshotPayloadGetNameRetType) {
setV2beta1CreateSnapshotPayloadGetNameAttributeType(&o.Name, v)
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *V2beta1CreateSnapshotPayload) GetSize() (res V2beta1CreateSnapshotPayloadGetSizeRetType) {
res, _ = o.GetSizeOk()
return
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V2beta1CreateSnapshotPayload) GetSizeOk() (ret V2beta1CreateSnapshotPayloadGetSizeRetType, ok bool) {
return getV2beta1CreateSnapshotPayloadGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
func (o *V2beta1CreateSnapshotPayload) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *V2beta1CreateSnapshotPayload) SetSize(v V2beta1CreateSnapshotPayloadGetSizeRetType) {
setV2beta1CreateSnapshotPayloadGetSizeAttributeType(&o.Size, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *V2beta1CreateSnapshotPayload) GetStatus() (res V2beta1CreateSnapshotPayloadGetStatusRetType) {
res, _ = o.GetStatusOk()
return
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V2beta1CreateSnapshotPayload) GetStatusOk() (ret V2beta1CreateSnapshotPayloadGetStatusRetType, ok bool) {
return getV2beta1CreateSnapshotPayloadGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *V2beta1CreateSnapshotPayload) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *V2beta1CreateSnapshotPayload) SetStatus(v V2beta1CreateSnapshotPayloadGetStatusRetType) {
setV2beta1CreateSnapshotPayloadGetStatusAttributeType(&o.Status, v)
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *V2beta1CreateSnapshotPayload) GetUpdatedAt() (res V2beta1CreateSnapshotPayloadGetUpdatedAtRetType) {
res, _ = o.GetUpdatedAtOk()
return
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V2beta1CreateSnapshotPayload) GetUpdatedAtOk() (ret V2beta1CreateSnapshotPayloadGetUpdatedAtRetType, ok bool) {
return getV2beta1CreateSnapshotPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *V2beta1CreateSnapshotPayload) HasUpdatedAt() bool {
_, ok := o.GetUpdatedAtOk()
return ok
}
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
func (o *V2beta1CreateSnapshotPayload) SetUpdatedAt(v V2beta1CreateSnapshotPayloadGetUpdatedAtRetType) {
setV2beta1CreateSnapshotPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
}
// GetVolumeId returns the VolumeId field value
func (o *V2beta1CreateSnapshotPayload) GetVolumeId() (ret V2beta1CreateSnapshotPayloadGetVolumeIdRetType) {
ret, _ = o.GetVolumeIdOk()
return ret
}
// GetVolumeIdOk returns a tuple with the VolumeId field value
// and a boolean to check if the value has been set.
func (o *V2beta1CreateSnapshotPayload) GetVolumeIdOk() (ret V2beta1CreateSnapshotPayloadGetVolumeIdRetType, ok bool) {
return getV2beta1CreateSnapshotPayloadGetVolumeIdAttributeTypeOk(o.VolumeId)
}
// SetVolumeId sets field value
func (o *V2beta1CreateSnapshotPayload) SetVolumeId(v V2beta1CreateSnapshotPayloadGetVolumeIdRetType) {
setV2beta1CreateSnapshotPayloadGetVolumeIdAttributeType(&o.VolumeId, v)
}
func (o V2beta1CreateSnapshotPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getV2beta1CreateSnapshotPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getV2beta1CreateSnapshotPayloadGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getV2beta1CreateSnapshotPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getV2beta1CreateSnapshotPayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getV2beta1CreateSnapshotPayloadGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
if val, ok := getV2beta1CreateSnapshotPayloadGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getV2beta1CreateSnapshotPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
toSerialize["UpdatedAt"] = val
}
if val, ok := getV2beta1CreateSnapshotPayloadGetVolumeIdAttributeTypeOk(o.VolumeId); ok {
toSerialize["VolumeId"] = val
}
return toSerialize, nil
}
type NullableV2beta1CreateSnapshotPayload struct {
value *V2beta1CreateSnapshotPayload
isSet bool
}
func (v NullableV2beta1CreateSnapshotPayload) Get() *V2beta1CreateSnapshotPayload {
return v.value
}
func (v *NullableV2beta1CreateSnapshotPayload) Set(val *V2beta1CreateSnapshotPayload) {
v.value = val
v.isSet = true
}
func (v NullableV2beta1CreateSnapshotPayload) IsSet() bool {
return v.isSet
}
func (v *NullableV2beta1CreateSnapshotPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableV2beta1CreateSnapshotPayload(val *V2beta1CreateSnapshotPayload) *NullableV2beta1CreateSnapshotPayload {
return &NullableV2beta1CreateSnapshotPayload{value: val, isSet: true}
}
func (v NullableV2beta1CreateSnapshotPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableV2beta1CreateSnapshotPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}