terraform-provider-stackitp.../pkg/iaasbeta/model_update_image_payload.go
2026-01-21 09:07:29 +01:00

464 lines
16 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"
)
// checks if the UpdateImagePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateImagePayload{}
/*
types and functions for agent
*/
// isModel
type UpdateImagePayloadGetAgentAttributeType = *ImageAgent
type UpdateImagePayloadGetAgentArgType = ImageAgent
type UpdateImagePayloadGetAgentRetType = ImageAgent
func getUpdateImagePayloadGetAgentAttributeTypeOk(arg UpdateImagePayloadGetAgentAttributeType) (ret UpdateImagePayloadGetAgentRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateImagePayloadGetAgentAttributeType(arg *UpdateImagePayloadGetAgentAttributeType, val UpdateImagePayloadGetAgentRetType) {
*arg = &val
}
/*
types and functions for config
*/
// isModel
type UpdateImagePayloadGetConfigAttributeType = *ImageConfig
type UpdateImagePayloadGetConfigArgType = ImageConfig
type UpdateImagePayloadGetConfigRetType = ImageConfig
func getUpdateImagePayloadGetConfigAttributeTypeOk(arg UpdateImagePayloadGetConfigAttributeType) (ret UpdateImagePayloadGetConfigRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateImagePayloadGetConfigAttributeType(arg *UpdateImagePayloadGetConfigAttributeType, val UpdateImagePayloadGetConfigRetType) {
*arg = &val
}
/*
types and functions for diskFormat
*/
// isNotNullableString
type UpdateImagePayloadGetDiskFormatAttributeType = *string
func getUpdateImagePayloadGetDiskFormatAttributeTypeOk(arg UpdateImagePayloadGetDiskFormatAttributeType) (ret UpdateImagePayloadGetDiskFormatRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateImagePayloadGetDiskFormatAttributeType(arg *UpdateImagePayloadGetDiskFormatAttributeType, val UpdateImagePayloadGetDiskFormatRetType) {
*arg = &val
}
type UpdateImagePayloadGetDiskFormatArgType = string
type UpdateImagePayloadGetDiskFormatRetType = string
/*
types and functions for labels
*/
// isFreeform
type UpdateImagePayloadGetLabelsAttributeType = *map[string]interface{}
type UpdateImagePayloadGetLabelsArgType = map[string]interface{}
type UpdateImagePayloadGetLabelsRetType = map[string]interface{}
func getUpdateImagePayloadGetLabelsAttributeTypeOk(arg UpdateImagePayloadGetLabelsAttributeType) (ret UpdateImagePayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateImagePayloadGetLabelsAttributeType(arg *UpdateImagePayloadGetLabelsAttributeType, val UpdateImagePayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for minDiskSize
*/
// isLong
type UpdateImagePayloadGetMinDiskSizeAttributeType = *int64
type UpdateImagePayloadGetMinDiskSizeArgType = int64
type UpdateImagePayloadGetMinDiskSizeRetType = int64
func getUpdateImagePayloadGetMinDiskSizeAttributeTypeOk(arg UpdateImagePayloadGetMinDiskSizeAttributeType) (ret UpdateImagePayloadGetMinDiskSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateImagePayloadGetMinDiskSizeAttributeType(arg *UpdateImagePayloadGetMinDiskSizeAttributeType, val UpdateImagePayloadGetMinDiskSizeRetType) {
*arg = &val
}
/*
types and functions for minRam
*/
// isLong
type UpdateImagePayloadGetMinRamAttributeType = *int64
type UpdateImagePayloadGetMinRamArgType = int64
type UpdateImagePayloadGetMinRamRetType = int64
func getUpdateImagePayloadGetMinRamAttributeTypeOk(arg UpdateImagePayloadGetMinRamAttributeType) (ret UpdateImagePayloadGetMinRamRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateImagePayloadGetMinRamAttributeType(arg *UpdateImagePayloadGetMinRamAttributeType, val UpdateImagePayloadGetMinRamRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type UpdateImagePayloadGetNameAttributeType = *string
func getUpdateImagePayloadGetNameAttributeTypeOk(arg UpdateImagePayloadGetNameAttributeType) (ret UpdateImagePayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateImagePayloadGetNameAttributeType(arg *UpdateImagePayloadGetNameAttributeType, val UpdateImagePayloadGetNameRetType) {
*arg = &val
}
type UpdateImagePayloadGetNameArgType = string
type UpdateImagePayloadGetNameRetType = string
/*
types and functions for protected
*/
// isBoolean
type UpdateImagePayloadgetProtectedAttributeType = *bool
type UpdateImagePayloadgetProtectedArgType = bool
type UpdateImagePayloadgetProtectedRetType = bool
func getUpdateImagePayloadgetProtectedAttributeTypeOk(arg UpdateImagePayloadgetProtectedAttributeType) (ret UpdateImagePayloadgetProtectedRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateImagePayloadgetProtectedAttributeType(arg *UpdateImagePayloadgetProtectedAttributeType, val UpdateImagePayloadgetProtectedRetType) {
*arg = &val
}
// UpdateImagePayload Object that represents an update request body of an Image.
type UpdateImagePayload struct {
Agent UpdateImagePayloadGetAgentAttributeType `json:"agent,omitempty"`
Config UpdateImagePayloadGetConfigAttributeType `json:"config,omitempty"`
// Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`.
DiskFormat UpdateImagePayloadGetDiskFormatAttributeType `json:"diskFormat,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 UpdateImagePayloadGetLabelsAttributeType `json:"labels,omitempty"`
// Size in Gigabyte.
MinDiskSize UpdateImagePayloadGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"`
// Size in Megabyte.
MinRam UpdateImagePayloadGetMinRamAttributeType `json:"minRam,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
Name UpdateImagePayloadGetNameAttributeType `json:"name,omitempty"`
// When true the image is prevented from being deleted.
Protected UpdateImagePayloadgetProtectedAttributeType `json:"protected,omitempty"`
}
// NewUpdateImagePayload instantiates a new UpdateImagePayload 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 NewUpdateImagePayload() *UpdateImagePayload {
this := UpdateImagePayload{}
return &this
}
// NewUpdateImagePayloadWithDefaults instantiates a new UpdateImagePayload 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 NewUpdateImagePayloadWithDefaults() *UpdateImagePayload {
this := UpdateImagePayload{}
return &this
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *UpdateImagePayload) GetAgent() (res UpdateImagePayloadGetAgentRetType) {
res, _ = o.GetAgentOk()
return
}
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateImagePayload) GetAgentOk() (ret UpdateImagePayloadGetAgentRetType, ok bool) {
return getUpdateImagePayloadGetAgentAttributeTypeOk(o.Agent)
}
// HasAgent returns a boolean if a field has been set.
func (o *UpdateImagePayload) HasAgent() bool {
_, ok := o.GetAgentOk()
return ok
}
// SetAgent gets a reference to the given ImageAgent and assigns it to the Agent field.
func (o *UpdateImagePayload) SetAgent(v UpdateImagePayloadGetAgentRetType) {
setUpdateImagePayloadGetAgentAttributeType(&o.Agent, v)
}
// GetConfig returns the Config field value if set, zero value otherwise.
func (o *UpdateImagePayload) GetConfig() (res UpdateImagePayloadGetConfigRetType) {
res, _ = o.GetConfigOk()
return
}
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateImagePayload) GetConfigOk() (ret UpdateImagePayloadGetConfigRetType, ok bool) {
return getUpdateImagePayloadGetConfigAttributeTypeOk(o.Config)
}
// HasConfig returns a boolean if a field has been set.
func (o *UpdateImagePayload) HasConfig() bool {
_, ok := o.GetConfigOk()
return ok
}
// SetConfig gets a reference to the given ImageConfig and assigns it to the Config field.
func (o *UpdateImagePayload) SetConfig(v UpdateImagePayloadGetConfigRetType) {
setUpdateImagePayloadGetConfigAttributeType(&o.Config, v)
}
// GetDiskFormat returns the DiskFormat field value if set, zero value otherwise.
func (o *UpdateImagePayload) GetDiskFormat() (res UpdateImagePayloadGetDiskFormatRetType) {
res, _ = o.GetDiskFormatOk()
return
}
// GetDiskFormatOk returns a tuple with the DiskFormat field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateImagePayload) GetDiskFormatOk() (ret UpdateImagePayloadGetDiskFormatRetType, ok bool) {
return getUpdateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat)
}
// HasDiskFormat returns a boolean if a field has been set.
func (o *UpdateImagePayload) HasDiskFormat() bool {
_, ok := o.GetDiskFormatOk()
return ok
}
// SetDiskFormat gets a reference to the given string and assigns it to the DiskFormat field.
func (o *UpdateImagePayload) SetDiskFormat(v UpdateImagePayloadGetDiskFormatRetType) {
setUpdateImagePayloadGetDiskFormatAttributeType(&o.DiskFormat, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdateImagePayload) GetLabels() (res UpdateImagePayloadGetLabelsRetType) {
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 *UpdateImagePayload) GetLabelsOk() (ret UpdateImagePayloadGetLabelsRetType, ok bool) {
return getUpdateImagePayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateImagePayload) 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 *UpdateImagePayload) SetLabels(v UpdateImagePayloadGetLabelsRetType) {
setUpdateImagePayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetMinDiskSize returns the MinDiskSize field value if set, zero value otherwise.
func (o *UpdateImagePayload) GetMinDiskSize() (res UpdateImagePayloadGetMinDiskSizeRetType) {
res, _ = o.GetMinDiskSizeOk()
return
}
// GetMinDiskSizeOk returns a tuple with the MinDiskSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateImagePayload) GetMinDiskSizeOk() (ret UpdateImagePayloadGetMinDiskSizeRetType, ok bool) {
return getUpdateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize)
}
// HasMinDiskSize returns a boolean if a field has been set.
func (o *UpdateImagePayload) HasMinDiskSize() bool {
_, ok := o.GetMinDiskSizeOk()
return ok
}
// SetMinDiskSize gets a reference to the given int64 and assigns it to the MinDiskSize field.
func (o *UpdateImagePayload) SetMinDiskSize(v UpdateImagePayloadGetMinDiskSizeRetType) {
setUpdateImagePayloadGetMinDiskSizeAttributeType(&o.MinDiskSize, v)
}
// GetMinRam returns the MinRam field value if set, zero value otherwise.
func (o *UpdateImagePayload) GetMinRam() (res UpdateImagePayloadGetMinRamRetType) {
res, _ = o.GetMinRamOk()
return
}
// GetMinRamOk returns a tuple with the MinRam field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateImagePayload) GetMinRamOk() (ret UpdateImagePayloadGetMinRamRetType, ok bool) {
return getUpdateImagePayloadGetMinRamAttributeTypeOk(o.MinRam)
}
// HasMinRam returns a boolean if a field has been set.
func (o *UpdateImagePayload) HasMinRam() bool {
_, ok := o.GetMinRamOk()
return ok
}
// SetMinRam gets a reference to the given int64 and assigns it to the MinRam field.
func (o *UpdateImagePayload) SetMinRam(v UpdateImagePayloadGetMinRamRetType) {
setUpdateImagePayloadGetMinRamAttributeType(&o.MinRam, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *UpdateImagePayload) GetName() (res UpdateImagePayloadGetNameRetType) {
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 *UpdateImagePayload) GetNameOk() (ret UpdateImagePayloadGetNameRetType, ok bool) {
return getUpdateImagePayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *UpdateImagePayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *UpdateImagePayload) SetName(v UpdateImagePayloadGetNameRetType) {
setUpdateImagePayloadGetNameAttributeType(&o.Name, v)
}
// GetProtected returns the Protected field value if set, zero value otherwise.
func (o *UpdateImagePayload) GetProtected() (res UpdateImagePayloadgetProtectedRetType) {
res, _ = o.GetProtectedOk()
return
}
// GetProtectedOk returns a tuple with the Protected field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateImagePayload) GetProtectedOk() (ret UpdateImagePayloadgetProtectedRetType, ok bool) {
return getUpdateImagePayloadgetProtectedAttributeTypeOk(o.Protected)
}
// HasProtected returns a boolean if a field has been set.
func (o *UpdateImagePayload) HasProtected() bool {
_, ok := o.GetProtectedOk()
return ok
}
// SetProtected gets a reference to the given bool and assigns it to the Protected field.
func (o *UpdateImagePayload) SetProtected(v UpdateImagePayloadgetProtectedRetType) {
setUpdateImagePayloadgetProtectedAttributeType(&o.Protected, v)
}
func (o UpdateImagePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateImagePayloadGetAgentAttributeTypeOk(o.Agent); ok {
toSerialize["Agent"] = val
}
if val, ok := getUpdateImagePayloadGetConfigAttributeTypeOk(o.Config); ok {
toSerialize["Config"] = val
}
if val, ok := getUpdateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat); ok {
toSerialize["DiskFormat"] = val
}
if val, ok := getUpdateImagePayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize); ok {
toSerialize["MinDiskSize"] = val
}
if val, ok := getUpdateImagePayloadGetMinRamAttributeTypeOk(o.MinRam); ok {
toSerialize["MinRam"] = val
}
if val, ok := getUpdateImagePayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getUpdateImagePayloadgetProtectedAttributeTypeOk(o.Protected); ok {
toSerialize["Protected"] = val
}
return toSerialize, nil
}
type NullableUpdateImagePayload struct {
value *UpdateImagePayload
isSet bool
}
func (v NullableUpdateImagePayload) Get() *UpdateImagePayload {
return v.value
}
func (v *NullableUpdateImagePayload) Set(val *UpdateImagePayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateImagePayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateImagePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateImagePayload(val *UpdateImagePayload) *NullableUpdateImagePayload {
return &NullableUpdateImagePayload{value: val, isSet: true}
}
func (v NullableUpdateImagePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateImagePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}