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

894 lines
31 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 CreateImagePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateImagePayload{}
/*
types and functions for agent
*/
// isModel
type CreateImagePayloadGetAgentAttributeType = *ImageAgent
type CreateImagePayloadGetAgentArgType = ImageAgent
type CreateImagePayloadGetAgentRetType = ImageAgent
func getCreateImagePayloadGetAgentAttributeTypeOk(arg CreateImagePayloadGetAgentAttributeType) (ret CreateImagePayloadGetAgentRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetAgentAttributeType(arg *CreateImagePayloadGetAgentAttributeType, val CreateImagePayloadGetAgentRetType) {
*arg = &val
}
/*
types and functions for checksum
*/
// isModel
type CreateImagePayloadGetChecksumAttributeType = *ImageChecksum
type CreateImagePayloadGetChecksumArgType = ImageChecksum
type CreateImagePayloadGetChecksumRetType = ImageChecksum
func getCreateImagePayloadGetChecksumAttributeTypeOk(arg CreateImagePayloadGetChecksumAttributeType) (ret CreateImagePayloadGetChecksumRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetChecksumAttributeType(arg *CreateImagePayloadGetChecksumAttributeType, val CreateImagePayloadGetChecksumRetType) {
*arg = &val
}
/*
types and functions for config
*/
// isModel
type CreateImagePayloadGetConfigAttributeType = *ImageConfig
type CreateImagePayloadGetConfigArgType = ImageConfig
type CreateImagePayloadGetConfigRetType = ImageConfig
func getCreateImagePayloadGetConfigAttributeTypeOk(arg CreateImagePayloadGetConfigAttributeType) (ret CreateImagePayloadGetConfigRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetConfigAttributeType(arg *CreateImagePayloadGetConfigAttributeType, val CreateImagePayloadGetConfigRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type CreateImagePayloadGetCreatedAtAttributeType = *time.Time
type CreateImagePayloadGetCreatedAtArgType = time.Time
type CreateImagePayloadGetCreatedAtRetType = time.Time
func getCreateImagePayloadGetCreatedAtAttributeTypeOk(arg CreateImagePayloadGetCreatedAtAttributeType) (ret CreateImagePayloadGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetCreatedAtAttributeType(arg *CreateImagePayloadGetCreatedAtAttributeType, val CreateImagePayloadGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for diskFormat
*/
// isNotNullableString
type CreateImagePayloadGetDiskFormatAttributeType = *string
func getCreateImagePayloadGetDiskFormatAttributeTypeOk(arg CreateImagePayloadGetDiskFormatAttributeType) (ret CreateImagePayloadGetDiskFormatRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetDiskFormatAttributeType(arg *CreateImagePayloadGetDiskFormatAttributeType, val CreateImagePayloadGetDiskFormatRetType) {
*arg = &val
}
type CreateImagePayloadGetDiskFormatArgType = string
type CreateImagePayloadGetDiskFormatRetType = string
/*
types and functions for id
*/
// isNotNullableString
type CreateImagePayloadGetIdAttributeType = *string
func getCreateImagePayloadGetIdAttributeTypeOk(arg CreateImagePayloadGetIdAttributeType) (ret CreateImagePayloadGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetIdAttributeType(arg *CreateImagePayloadGetIdAttributeType, val CreateImagePayloadGetIdRetType) {
*arg = &val
}
type CreateImagePayloadGetIdArgType = string
type CreateImagePayloadGetIdRetType = string
/*
types and functions for importProgress
*/
// isLong
type CreateImagePayloadGetImportProgressAttributeType = *int64
type CreateImagePayloadGetImportProgressArgType = int64
type CreateImagePayloadGetImportProgressRetType = int64
func getCreateImagePayloadGetImportProgressAttributeTypeOk(arg CreateImagePayloadGetImportProgressAttributeType) (ret CreateImagePayloadGetImportProgressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetImportProgressAttributeType(arg *CreateImagePayloadGetImportProgressAttributeType, val CreateImagePayloadGetImportProgressRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isFreeform
type CreateImagePayloadGetLabelsAttributeType = *map[string]interface{}
type CreateImagePayloadGetLabelsArgType = map[string]interface{}
type CreateImagePayloadGetLabelsRetType = map[string]interface{}
func getCreateImagePayloadGetLabelsAttributeTypeOk(arg CreateImagePayloadGetLabelsAttributeType) (ret CreateImagePayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetLabelsAttributeType(arg *CreateImagePayloadGetLabelsAttributeType, val CreateImagePayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for minDiskSize
*/
// isLong
type CreateImagePayloadGetMinDiskSizeAttributeType = *int64
type CreateImagePayloadGetMinDiskSizeArgType = int64
type CreateImagePayloadGetMinDiskSizeRetType = int64
func getCreateImagePayloadGetMinDiskSizeAttributeTypeOk(arg CreateImagePayloadGetMinDiskSizeAttributeType) (ret CreateImagePayloadGetMinDiskSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetMinDiskSizeAttributeType(arg *CreateImagePayloadGetMinDiskSizeAttributeType, val CreateImagePayloadGetMinDiskSizeRetType) {
*arg = &val
}
/*
types and functions for minRam
*/
// isLong
type CreateImagePayloadGetMinRamAttributeType = *int64
type CreateImagePayloadGetMinRamArgType = int64
type CreateImagePayloadGetMinRamRetType = int64
func getCreateImagePayloadGetMinRamAttributeTypeOk(arg CreateImagePayloadGetMinRamAttributeType) (ret CreateImagePayloadGetMinRamRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetMinRamAttributeType(arg *CreateImagePayloadGetMinRamAttributeType, val CreateImagePayloadGetMinRamRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type CreateImagePayloadGetNameAttributeType = *string
func getCreateImagePayloadGetNameAttributeTypeOk(arg CreateImagePayloadGetNameAttributeType) (ret CreateImagePayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetNameAttributeType(arg *CreateImagePayloadGetNameAttributeType, val CreateImagePayloadGetNameRetType) {
*arg = &val
}
type CreateImagePayloadGetNameArgType = string
type CreateImagePayloadGetNameRetType = string
/*
types and functions for owner
*/
// isNotNullableString
type CreateImagePayloadGetOwnerAttributeType = *string
func getCreateImagePayloadGetOwnerAttributeTypeOk(arg CreateImagePayloadGetOwnerAttributeType) (ret CreateImagePayloadGetOwnerRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetOwnerAttributeType(arg *CreateImagePayloadGetOwnerAttributeType, val CreateImagePayloadGetOwnerRetType) {
*arg = &val
}
type CreateImagePayloadGetOwnerArgType = string
type CreateImagePayloadGetOwnerRetType = string
/*
types and functions for protected
*/
// isBoolean
type CreateImagePayloadgetProtectedAttributeType = *bool
type CreateImagePayloadgetProtectedArgType = bool
type CreateImagePayloadgetProtectedRetType = bool
func getCreateImagePayloadgetProtectedAttributeTypeOk(arg CreateImagePayloadgetProtectedAttributeType) (ret CreateImagePayloadgetProtectedRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadgetProtectedAttributeType(arg *CreateImagePayloadgetProtectedAttributeType, val CreateImagePayloadgetProtectedRetType) {
*arg = &val
}
/*
types and functions for scope
*/
// isNotNullableString
type CreateImagePayloadGetScopeAttributeType = *string
func getCreateImagePayloadGetScopeAttributeTypeOk(arg CreateImagePayloadGetScopeAttributeType) (ret CreateImagePayloadGetScopeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetScopeAttributeType(arg *CreateImagePayloadGetScopeAttributeType, val CreateImagePayloadGetScopeRetType) {
*arg = &val
}
type CreateImagePayloadGetScopeArgType = string
type CreateImagePayloadGetScopeRetType = string
/*
types and functions for size
*/
// isLong
type CreateImagePayloadGetSizeAttributeType = *int64
type CreateImagePayloadGetSizeArgType = int64
type CreateImagePayloadGetSizeRetType = int64
func getCreateImagePayloadGetSizeAttributeTypeOk(arg CreateImagePayloadGetSizeAttributeType) (ret CreateImagePayloadGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetSizeAttributeType(arg *CreateImagePayloadGetSizeAttributeType, val CreateImagePayloadGetSizeRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type CreateImagePayloadGetStatusAttributeType = *string
func getCreateImagePayloadGetStatusAttributeTypeOk(arg CreateImagePayloadGetStatusAttributeType) (ret CreateImagePayloadGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetStatusAttributeType(arg *CreateImagePayloadGetStatusAttributeType, val CreateImagePayloadGetStatusRetType) {
*arg = &val
}
type CreateImagePayloadGetStatusArgType = string
type CreateImagePayloadGetStatusRetType = string
/*
types and functions for updatedAt
*/
// isDateTime
type CreateImagePayloadGetUpdatedAtAttributeType = *time.Time
type CreateImagePayloadGetUpdatedAtArgType = time.Time
type CreateImagePayloadGetUpdatedAtRetType = time.Time
func getCreateImagePayloadGetUpdatedAtAttributeTypeOk(arg CreateImagePayloadGetUpdatedAtAttributeType) (ret CreateImagePayloadGetUpdatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateImagePayloadGetUpdatedAtAttributeType(arg *CreateImagePayloadGetUpdatedAtAttributeType, val CreateImagePayloadGetUpdatedAtRetType) {
*arg = &val
}
// CreateImagePayload Object that represents an Image and its parameters. Used for Creating and returning (get/list).
type CreateImagePayload struct {
Agent CreateImagePayloadGetAgentAttributeType `json:"agent,omitempty"`
Checksum CreateImagePayloadGetChecksumAttributeType `json:"checksum,omitempty"`
Config CreateImagePayloadGetConfigAttributeType `json:"config,omitempty"`
// Date-time when resource was created.
CreatedAt CreateImagePayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`.
// REQUIRED
DiskFormat CreateImagePayloadGetDiskFormatAttributeType `json:"diskFormat" required:"true"`
// Universally Unique Identifier (UUID).
Id CreateImagePayloadGetIdAttributeType `json:"id,omitempty"`
// Indicates Image Import Progress in percent.
ImportProgress CreateImagePayloadGetImportProgressAttributeType `json:"importProgress,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 CreateImagePayloadGetLabelsAttributeType `json:"labels,omitempty"`
// Size in Gigabyte.
MinDiskSize CreateImagePayloadGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"`
// Size in Megabyte.
MinRam CreateImagePayloadGetMinRamAttributeType `json:"minRam,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
// REQUIRED
Name CreateImagePayloadGetNameAttributeType `json:"name" required:"true"`
// Universally Unique Identifier (UUID).
Owner CreateImagePayloadGetOwnerAttributeType `json:"owner,omitempty"`
// When true the image is prevented from being deleted.
Protected CreateImagePayloadgetProtectedAttributeType `json:"protected,omitempty"`
// Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`.
Scope CreateImagePayloadGetScopeAttributeType `json:"scope,omitempty"`
// Size in bytes.
Size CreateImagePayloadGetSizeAttributeType `json:"size,omitempty"`
// The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`.
Status CreateImagePayloadGetStatusAttributeType `json:"status,omitempty"`
// Date-time when resource was last updated.
UpdatedAt CreateImagePayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
}
type _CreateImagePayload CreateImagePayload
// NewCreateImagePayload instantiates a new CreateImagePayload 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 NewCreateImagePayload(diskFormat CreateImagePayloadGetDiskFormatArgType, name CreateImagePayloadGetNameArgType) *CreateImagePayload {
this := CreateImagePayload{}
setCreateImagePayloadGetDiskFormatAttributeType(&this.DiskFormat, diskFormat)
setCreateImagePayloadGetNameAttributeType(&this.Name, name)
return &this
}
// NewCreateImagePayloadWithDefaults instantiates a new CreateImagePayload 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 NewCreateImagePayloadWithDefaults() *CreateImagePayload {
this := CreateImagePayload{}
return &this
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *CreateImagePayload) GetAgent() (res CreateImagePayloadGetAgentRetType) {
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 *CreateImagePayload) GetAgentOk() (ret CreateImagePayloadGetAgentRetType, ok bool) {
return getCreateImagePayloadGetAgentAttributeTypeOk(o.Agent)
}
// HasAgent returns a boolean if a field has been set.
func (o *CreateImagePayload) HasAgent() bool {
_, ok := o.GetAgentOk()
return ok
}
// SetAgent gets a reference to the given ImageAgent and assigns it to the Agent field.
func (o *CreateImagePayload) SetAgent(v CreateImagePayloadGetAgentRetType) {
setCreateImagePayloadGetAgentAttributeType(&o.Agent, v)
}
// GetChecksum returns the Checksum field value if set, zero value otherwise.
func (o *CreateImagePayload) GetChecksum() (res CreateImagePayloadGetChecksumRetType) {
res, _ = o.GetChecksumOk()
return
}
// GetChecksumOk returns a tuple with the Checksum field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateImagePayload) GetChecksumOk() (ret CreateImagePayloadGetChecksumRetType, ok bool) {
return getCreateImagePayloadGetChecksumAttributeTypeOk(o.Checksum)
}
// HasChecksum returns a boolean if a field has been set.
func (o *CreateImagePayload) HasChecksum() bool {
_, ok := o.GetChecksumOk()
return ok
}
// SetChecksum gets a reference to the given ImageChecksum and assigns it to the Checksum field.
func (o *CreateImagePayload) SetChecksum(v CreateImagePayloadGetChecksumRetType) {
setCreateImagePayloadGetChecksumAttributeType(&o.Checksum, v)
}
// GetConfig returns the Config field value if set, zero value otherwise.
func (o *CreateImagePayload) GetConfig() (res CreateImagePayloadGetConfigRetType) {
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 *CreateImagePayload) GetConfigOk() (ret CreateImagePayloadGetConfigRetType, ok bool) {
return getCreateImagePayloadGetConfigAttributeTypeOk(o.Config)
}
// HasConfig returns a boolean if a field has been set.
func (o *CreateImagePayload) HasConfig() bool {
_, ok := o.GetConfigOk()
return ok
}
// SetConfig gets a reference to the given ImageConfig and assigns it to the Config field.
func (o *CreateImagePayload) SetConfig(v CreateImagePayloadGetConfigRetType) {
setCreateImagePayloadGetConfigAttributeType(&o.Config, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *CreateImagePayload) GetCreatedAt() (res CreateImagePayloadGetCreatedAtRetType) {
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 *CreateImagePayload) GetCreatedAtOk() (ret CreateImagePayloadGetCreatedAtRetType, ok bool) {
return getCreateImagePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *CreateImagePayload) 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 *CreateImagePayload) SetCreatedAt(v CreateImagePayloadGetCreatedAtRetType) {
setCreateImagePayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetDiskFormat returns the DiskFormat field value
func (o *CreateImagePayload) GetDiskFormat() (ret CreateImagePayloadGetDiskFormatRetType) {
ret, _ = o.GetDiskFormatOk()
return ret
}
// GetDiskFormatOk returns a tuple with the DiskFormat field value
// and a boolean to check if the value has been set.
func (o *CreateImagePayload) GetDiskFormatOk() (ret CreateImagePayloadGetDiskFormatRetType, ok bool) {
return getCreateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat)
}
// SetDiskFormat sets field value
func (o *CreateImagePayload) SetDiskFormat(v CreateImagePayloadGetDiskFormatRetType) {
setCreateImagePayloadGetDiskFormatAttributeType(&o.DiskFormat, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CreateImagePayload) GetId() (res CreateImagePayloadGetIdRetType) {
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 *CreateImagePayload) GetIdOk() (ret CreateImagePayloadGetIdRetType, ok bool) {
return getCreateImagePayloadGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *CreateImagePayload) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *CreateImagePayload) SetId(v CreateImagePayloadGetIdRetType) {
setCreateImagePayloadGetIdAttributeType(&o.Id, v)
}
// GetImportProgress returns the ImportProgress field value if set, zero value otherwise.
func (o *CreateImagePayload) GetImportProgress() (res CreateImagePayloadGetImportProgressRetType) {
res, _ = o.GetImportProgressOk()
return
}
// GetImportProgressOk returns a tuple with the ImportProgress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateImagePayload) GetImportProgressOk() (ret CreateImagePayloadGetImportProgressRetType, ok bool) {
return getCreateImagePayloadGetImportProgressAttributeTypeOk(o.ImportProgress)
}
// HasImportProgress returns a boolean if a field has been set.
func (o *CreateImagePayload) HasImportProgress() bool {
_, ok := o.GetImportProgressOk()
return ok
}
// SetImportProgress gets a reference to the given int64 and assigns it to the ImportProgress field.
func (o *CreateImagePayload) SetImportProgress(v CreateImagePayloadGetImportProgressRetType) {
setCreateImagePayloadGetImportProgressAttributeType(&o.ImportProgress, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateImagePayload) GetLabels() (res CreateImagePayloadGetLabelsRetType) {
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 *CreateImagePayload) GetLabelsOk() (ret CreateImagePayloadGetLabelsRetType, ok bool) {
return getCreateImagePayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateImagePayload) 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 *CreateImagePayload) SetLabels(v CreateImagePayloadGetLabelsRetType) {
setCreateImagePayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetMinDiskSize returns the MinDiskSize field value if set, zero value otherwise.
func (o *CreateImagePayload) GetMinDiskSize() (res CreateImagePayloadGetMinDiskSizeRetType) {
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 *CreateImagePayload) GetMinDiskSizeOk() (ret CreateImagePayloadGetMinDiskSizeRetType, ok bool) {
return getCreateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize)
}
// HasMinDiskSize returns a boolean if a field has been set.
func (o *CreateImagePayload) HasMinDiskSize() bool {
_, ok := o.GetMinDiskSizeOk()
return ok
}
// SetMinDiskSize gets a reference to the given int64 and assigns it to the MinDiskSize field.
func (o *CreateImagePayload) SetMinDiskSize(v CreateImagePayloadGetMinDiskSizeRetType) {
setCreateImagePayloadGetMinDiskSizeAttributeType(&o.MinDiskSize, v)
}
// GetMinRam returns the MinRam field value if set, zero value otherwise.
func (o *CreateImagePayload) GetMinRam() (res CreateImagePayloadGetMinRamRetType) {
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 *CreateImagePayload) GetMinRamOk() (ret CreateImagePayloadGetMinRamRetType, ok bool) {
return getCreateImagePayloadGetMinRamAttributeTypeOk(o.MinRam)
}
// HasMinRam returns a boolean if a field has been set.
func (o *CreateImagePayload) HasMinRam() bool {
_, ok := o.GetMinRamOk()
return ok
}
// SetMinRam gets a reference to the given int64 and assigns it to the MinRam field.
func (o *CreateImagePayload) SetMinRam(v CreateImagePayloadGetMinRamRetType) {
setCreateImagePayloadGetMinRamAttributeType(&o.MinRam, v)
}
// GetName returns the Name field value
func (o *CreateImagePayload) GetName() (ret CreateImagePayloadGetNameRetType) {
ret, _ = o.GetNameOk()
return ret
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *CreateImagePayload) GetNameOk() (ret CreateImagePayloadGetNameRetType, ok bool) {
return getCreateImagePayloadGetNameAttributeTypeOk(o.Name)
}
// SetName sets field value
func (o *CreateImagePayload) SetName(v CreateImagePayloadGetNameRetType) {
setCreateImagePayloadGetNameAttributeType(&o.Name, v)
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *CreateImagePayload) GetOwner() (res CreateImagePayloadGetOwnerRetType) {
res, _ = o.GetOwnerOk()
return
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateImagePayload) GetOwnerOk() (ret CreateImagePayloadGetOwnerRetType, ok bool) {
return getCreateImagePayloadGetOwnerAttributeTypeOk(o.Owner)
}
// HasOwner returns a boolean if a field has been set.
func (o *CreateImagePayload) HasOwner() bool {
_, ok := o.GetOwnerOk()
return ok
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *CreateImagePayload) SetOwner(v CreateImagePayloadGetOwnerRetType) {
setCreateImagePayloadGetOwnerAttributeType(&o.Owner, v)
}
// GetProtected returns the Protected field value if set, zero value otherwise.
func (o *CreateImagePayload) GetProtected() (res CreateImagePayloadgetProtectedRetType) {
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 *CreateImagePayload) GetProtectedOk() (ret CreateImagePayloadgetProtectedRetType, ok bool) {
return getCreateImagePayloadgetProtectedAttributeTypeOk(o.Protected)
}
// HasProtected returns a boolean if a field has been set.
func (o *CreateImagePayload) HasProtected() bool {
_, ok := o.GetProtectedOk()
return ok
}
// SetProtected gets a reference to the given bool and assigns it to the Protected field.
func (o *CreateImagePayload) SetProtected(v CreateImagePayloadgetProtectedRetType) {
setCreateImagePayloadgetProtectedAttributeType(&o.Protected, v)
}
// GetScope returns the Scope field value if set, zero value otherwise.
func (o *CreateImagePayload) GetScope() (res CreateImagePayloadGetScopeRetType) {
res, _ = o.GetScopeOk()
return
}
// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateImagePayload) GetScopeOk() (ret CreateImagePayloadGetScopeRetType, ok bool) {
return getCreateImagePayloadGetScopeAttributeTypeOk(o.Scope)
}
// HasScope returns a boolean if a field has been set.
func (o *CreateImagePayload) HasScope() bool {
_, ok := o.GetScopeOk()
return ok
}
// SetScope gets a reference to the given string and assigns it to the Scope field.
func (o *CreateImagePayload) SetScope(v CreateImagePayloadGetScopeRetType) {
setCreateImagePayloadGetScopeAttributeType(&o.Scope, v)
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *CreateImagePayload) GetSize() (res CreateImagePayloadGetSizeRetType) {
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 *CreateImagePayload) GetSizeOk() (ret CreateImagePayloadGetSizeRetType, ok bool) {
return getCreateImagePayloadGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
func (o *CreateImagePayload) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *CreateImagePayload) SetSize(v CreateImagePayloadGetSizeRetType) {
setCreateImagePayloadGetSizeAttributeType(&o.Size, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *CreateImagePayload) GetStatus() (res CreateImagePayloadGetStatusRetType) {
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 *CreateImagePayload) GetStatusOk() (ret CreateImagePayloadGetStatusRetType, ok bool) {
return getCreateImagePayloadGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *CreateImagePayload) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *CreateImagePayload) SetStatus(v CreateImagePayloadGetStatusRetType) {
setCreateImagePayloadGetStatusAttributeType(&o.Status, v)
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *CreateImagePayload) GetUpdatedAt() (res CreateImagePayloadGetUpdatedAtRetType) {
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 *CreateImagePayload) GetUpdatedAtOk() (ret CreateImagePayloadGetUpdatedAtRetType, ok bool) {
return getCreateImagePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *CreateImagePayload) 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 *CreateImagePayload) SetUpdatedAt(v CreateImagePayloadGetUpdatedAtRetType) {
setCreateImagePayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
}
func (o CreateImagePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateImagePayloadGetAgentAttributeTypeOk(o.Agent); ok {
toSerialize["Agent"] = val
}
if val, ok := getCreateImagePayloadGetChecksumAttributeTypeOk(o.Checksum); ok {
toSerialize["Checksum"] = val
}
if val, ok := getCreateImagePayloadGetConfigAttributeTypeOk(o.Config); ok {
toSerialize["Config"] = val
}
if val, ok := getCreateImagePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getCreateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat); ok {
toSerialize["DiskFormat"] = val
}
if val, ok := getCreateImagePayloadGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getCreateImagePayloadGetImportProgressAttributeTypeOk(o.ImportProgress); ok {
toSerialize["ImportProgress"] = val
}
if val, ok := getCreateImagePayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize); ok {
toSerialize["MinDiskSize"] = val
}
if val, ok := getCreateImagePayloadGetMinRamAttributeTypeOk(o.MinRam); ok {
toSerialize["MinRam"] = val
}
if val, ok := getCreateImagePayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateImagePayloadGetOwnerAttributeTypeOk(o.Owner); ok {
toSerialize["Owner"] = val
}
if val, ok := getCreateImagePayloadgetProtectedAttributeTypeOk(o.Protected); ok {
toSerialize["Protected"] = val
}
if val, ok := getCreateImagePayloadGetScopeAttributeTypeOk(o.Scope); ok {
toSerialize["Scope"] = val
}
if val, ok := getCreateImagePayloadGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
if val, ok := getCreateImagePayloadGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getCreateImagePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
toSerialize["UpdatedAt"] = val
}
return toSerialize, nil
}
type NullableCreateImagePayload struct {
value *CreateImagePayload
isSet bool
}
func (v NullableCreateImagePayload) Get() *CreateImagePayload {
return v.value
}
func (v *NullableCreateImagePayload) Set(val *CreateImagePayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateImagePayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateImagePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateImagePayload(val *CreateImagePayload) *NullableCreateImagePayload {
return &NullableCreateImagePayload{value: val, isSet: true}
}
func (v NullableCreateImagePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateImagePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}