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

894 lines
26 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 Image type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Image{}
/*
types and functions for agent
*/
// isModel
type ImageGetAgentAttributeType = *ImageAgent
type ImageGetAgentArgType = ImageAgent
type ImageGetAgentRetType = ImageAgent
func getImageGetAgentAttributeTypeOk(arg ImageGetAgentAttributeType) (ret ImageGetAgentRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetAgentAttributeType(arg *ImageGetAgentAttributeType, val ImageGetAgentRetType) {
*arg = &val
}
/*
types and functions for checksum
*/
// isModel
type ImageGetChecksumAttributeType = *ImageChecksum
type ImageGetChecksumArgType = ImageChecksum
type ImageGetChecksumRetType = ImageChecksum
func getImageGetChecksumAttributeTypeOk(arg ImageGetChecksumAttributeType) (ret ImageGetChecksumRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetChecksumAttributeType(arg *ImageGetChecksumAttributeType, val ImageGetChecksumRetType) {
*arg = &val
}
/*
types and functions for config
*/
// isModel
type ImageGetConfigAttributeType = *ImageConfig
type ImageGetConfigArgType = ImageConfig
type ImageGetConfigRetType = ImageConfig
func getImageGetConfigAttributeTypeOk(arg ImageGetConfigAttributeType) (ret ImageGetConfigRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetConfigAttributeType(arg *ImageGetConfigAttributeType, val ImageGetConfigRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type ImageGetCreatedAtAttributeType = *time.Time
type ImageGetCreatedAtArgType = time.Time
type ImageGetCreatedAtRetType = time.Time
func getImageGetCreatedAtAttributeTypeOk(arg ImageGetCreatedAtAttributeType) (ret ImageGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetCreatedAtAttributeType(arg *ImageGetCreatedAtAttributeType, val ImageGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for diskFormat
*/
// isNotNullableString
type ImageGetDiskFormatAttributeType = *string
func getImageGetDiskFormatAttributeTypeOk(arg ImageGetDiskFormatAttributeType) (ret ImageGetDiskFormatRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetDiskFormatAttributeType(arg *ImageGetDiskFormatAttributeType, val ImageGetDiskFormatRetType) {
*arg = &val
}
type ImageGetDiskFormatArgType = string
type ImageGetDiskFormatRetType = string
/*
types and functions for id
*/
// isNotNullableString
type ImageGetIdAttributeType = *string
func getImageGetIdAttributeTypeOk(arg ImageGetIdAttributeType) (ret ImageGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetIdAttributeType(arg *ImageGetIdAttributeType, val ImageGetIdRetType) {
*arg = &val
}
type ImageGetIdArgType = string
type ImageGetIdRetType = string
/*
types and functions for importProgress
*/
// isLong
type ImageGetImportProgressAttributeType = *int64
type ImageGetImportProgressArgType = int64
type ImageGetImportProgressRetType = int64
func getImageGetImportProgressAttributeTypeOk(arg ImageGetImportProgressAttributeType) (ret ImageGetImportProgressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetImportProgressAttributeType(arg *ImageGetImportProgressAttributeType, val ImageGetImportProgressRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isFreeform
type ImageGetLabelsAttributeType = *map[string]interface{}
type ImageGetLabelsArgType = map[string]interface{}
type ImageGetLabelsRetType = map[string]interface{}
func getImageGetLabelsAttributeTypeOk(arg ImageGetLabelsAttributeType) (ret ImageGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetLabelsAttributeType(arg *ImageGetLabelsAttributeType, val ImageGetLabelsRetType) {
*arg = &val
}
/*
types and functions for minDiskSize
*/
// isLong
type ImageGetMinDiskSizeAttributeType = *int64
type ImageGetMinDiskSizeArgType = int64
type ImageGetMinDiskSizeRetType = int64
func getImageGetMinDiskSizeAttributeTypeOk(arg ImageGetMinDiskSizeAttributeType) (ret ImageGetMinDiskSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetMinDiskSizeAttributeType(arg *ImageGetMinDiskSizeAttributeType, val ImageGetMinDiskSizeRetType) {
*arg = &val
}
/*
types and functions for minRam
*/
// isLong
type ImageGetMinRamAttributeType = *int64
type ImageGetMinRamArgType = int64
type ImageGetMinRamRetType = int64
func getImageGetMinRamAttributeTypeOk(arg ImageGetMinRamAttributeType) (ret ImageGetMinRamRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetMinRamAttributeType(arg *ImageGetMinRamAttributeType, val ImageGetMinRamRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type ImageGetNameAttributeType = *string
func getImageGetNameAttributeTypeOk(arg ImageGetNameAttributeType) (ret ImageGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetNameAttributeType(arg *ImageGetNameAttributeType, val ImageGetNameRetType) {
*arg = &val
}
type ImageGetNameArgType = string
type ImageGetNameRetType = string
/*
types and functions for owner
*/
// isNotNullableString
type ImageGetOwnerAttributeType = *string
func getImageGetOwnerAttributeTypeOk(arg ImageGetOwnerAttributeType) (ret ImageGetOwnerRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetOwnerAttributeType(arg *ImageGetOwnerAttributeType, val ImageGetOwnerRetType) {
*arg = &val
}
type ImageGetOwnerArgType = string
type ImageGetOwnerRetType = string
/*
types and functions for protected
*/
// isBoolean
type ImagegetProtectedAttributeType = *bool
type ImagegetProtectedArgType = bool
type ImagegetProtectedRetType = bool
func getImagegetProtectedAttributeTypeOk(arg ImagegetProtectedAttributeType) (ret ImagegetProtectedRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImagegetProtectedAttributeType(arg *ImagegetProtectedAttributeType, val ImagegetProtectedRetType) {
*arg = &val
}
/*
types and functions for scope
*/
// isNotNullableString
type ImageGetScopeAttributeType = *string
func getImageGetScopeAttributeTypeOk(arg ImageGetScopeAttributeType) (ret ImageGetScopeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetScopeAttributeType(arg *ImageGetScopeAttributeType, val ImageGetScopeRetType) {
*arg = &val
}
type ImageGetScopeArgType = string
type ImageGetScopeRetType = string
/*
types and functions for size
*/
// isLong
type ImageGetSizeAttributeType = *int64
type ImageGetSizeArgType = int64
type ImageGetSizeRetType = int64
func getImageGetSizeAttributeTypeOk(arg ImageGetSizeAttributeType) (ret ImageGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetSizeAttributeType(arg *ImageGetSizeAttributeType, val ImageGetSizeRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type ImageGetStatusAttributeType = *string
func getImageGetStatusAttributeTypeOk(arg ImageGetStatusAttributeType) (ret ImageGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetStatusAttributeType(arg *ImageGetStatusAttributeType, val ImageGetStatusRetType) {
*arg = &val
}
type ImageGetStatusArgType = string
type ImageGetStatusRetType = string
/*
types and functions for updatedAt
*/
// isDateTime
type ImageGetUpdatedAtAttributeType = *time.Time
type ImageGetUpdatedAtArgType = time.Time
type ImageGetUpdatedAtRetType = time.Time
func getImageGetUpdatedAtAttributeTypeOk(arg ImageGetUpdatedAtAttributeType) (ret ImageGetUpdatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetUpdatedAtAttributeType(arg *ImageGetUpdatedAtAttributeType, val ImageGetUpdatedAtRetType) {
*arg = &val
}
// Image Object that represents an Image and its parameters. Used for Creating and returning (get/list).
type Image struct {
Agent ImageGetAgentAttributeType `json:"agent,omitempty"`
Checksum ImageGetChecksumAttributeType `json:"checksum,omitempty"`
Config ImageGetConfigAttributeType `json:"config,omitempty"`
// Date-time when resource was created.
CreatedAt ImageGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`.
// REQUIRED
DiskFormat ImageGetDiskFormatAttributeType `json:"diskFormat" required:"true"`
// Universally Unique Identifier (UUID).
Id ImageGetIdAttributeType `json:"id,omitempty"`
// Indicates Image Import Progress in percent.
ImportProgress ImageGetImportProgressAttributeType `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 ImageGetLabelsAttributeType `json:"labels,omitempty"`
// Size in Gigabyte.
MinDiskSize ImageGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"`
// Size in Megabyte.
MinRam ImageGetMinRamAttributeType `json:"minRam,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
// REQUIRED
Name ImageGetNameAttributeType `json:"name" required:"true"`
// Universally Unique Identifier (UUID).
Owner ImageGetOwnerAttributeType `json:"owner,omitempty"`
// When true the image is prevented from being deleted.
Protected ImagegetProtectedAttributeType `json:"protected,omitempty"`
// Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`.
Scope ImageGetScopeAttributeType `json:"scope,omitempty"`
// Size in bytes.
Size ImageGetSizeAttributeType `json:"size,omitempty"`
// The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`.
Status ImageGetStatusAttributeType `json:"status,omitempty"`
// Date-time when resource was last updated.
UpdatedAt ImageGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
}
type _Image Image
// NewImage instantiates a new Image 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 NewImage(diskFormat ImageGetDiskFormatArgType, name ImageGetNameArgType) *Image {
this := Image{}
setImageGetDiskFormatAttributeType(&this.DiskFormat, diskFormat)
setImageGetNameAttributeType(&this.Name, name)
return &this
}
// NewImageWithDefaults instantiates a new Image 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 NewImageWithDefaults() *Image {
this := Image{}
return &this
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *Image) GetAgent() (res ImageGetAgentRetType) {
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 *Image) GetAgentOk() (ret ImageGetAgentRetType, ok bool) {
return getImageGetAgentAttributeTypeOk(o.Agent)
}
// HasAgent returns a boolean if a field has been set.
func (o *Image) HasAgent() bool {
_, ok := o.GetAgentOk()
return ok
}
// SetAgent gets a reference to the given ImageAgent and assigns it to the Agent field.
func (o *Image) SetAgent(v ImageGetAgentRetType) {
setImageGetAgentAttributeType(&o.Agent, v)
}
// GetChecksum returns the Checksum field value if set, zero value otherwise.
func (o *Image) GetChecksum() (res ImageGetChecksumRetType) {
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 *Image) GetChecksumOk() (ret ImageGetChecksumRetType, ok bool) {
return getImageGetChecksumAttributeTypeOk(o.Checksum)
}
// HasChecksum returns a boolean if a field has been set.
func (o *Image) HasChecksum() bool {
_, ok := o.GetChecksumOk()
return ok
}
// SetChecksum gets a reference to the given ImageChecksum and assigns it to the Checksum field.
func (o *Image) SetChecksum(v ImageGetChecksumRetType) {
setImageGetChecksumAttributeType(&o.Checksum, v)
}
// GetConfig returns the Config field value if set, zero value otherwise.
func (o *Image) GetConfig() (res ImageGetConfigRetType) {
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 *Image) GetConfigOk() (ret ImageGetConfigRetType, ok bool) {
return getImageGetConfigAttributeTypeOk(o.Config)
}
// HasConfig returns a boolean if a field has been set.
func (o *Image) HasConfig() bool {
_, ok := o.GetConfigOk()
return ok
}
// SetConfig gets a reference to the given ImageConfig and assigns it to the Config field.
func (o *Image) SetConfig(v ImageGetConfigRetType) {
setImageGetConfigAttributeType(&o.Config, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *Image) GetCreatedAt() (res ImageGetCreatedAtRetType) {
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 *Image) GetCreatedAtOk() (ret ImageGetCreatedAtRetType, ok bool) {
return getImageGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *Image) 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 *Image) SetCreatedAt(v ImageGetCreatedAtRetType) {
setImageGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetDiskFormat returns the DiskFormat field value
func (o *Image) GetDiskFormat() (ret ImageGetDiskFormatRetType) {
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 *Image) GetDiskFormatOk() (ret ImageGetDiskFormatRetType, ok bool) {
return getImageGetDiskFormatAttributeTypeOk(o.DiskFormat)
}
// SetDiskFormat sets field value
func (o *Image) SetDiskFormat(v ImageGetDiskFormatRetType) {
setImageGetDiskFormatAttributeType(&o.DiskFormat, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Image) GetId() (res ImageGetIdRetType) {
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 *Image) GetIdOk() (ret ImageGetIdRetType, ok bool) {
return getImageGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *Image) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Image) SetId(v ImageGetIdRetType) {
setImageGetIdAttributeType(&o.Id, v)
}
// GetImportProgress returns the ImportProgress field value if set, zero value otherwise.
func (o *Image) GetImportProgress() (res ImageGetImportProgressRetType) {
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 *Image) GetImportProgressOk() (ret ImageGetImportProgressRetType, ok bool) {
return getImageGetImportProgressAttributeTypeOk(o.ImportProgress)
}
// HasImportProgress returns a boolean if a field has been set.
func (o *Image) HasImportProgress() bool {
_, ok := o.GetImportProgressOk()
return ok
}
// SetImportProgress gets a reference to the given int64 and assigns it to the ImportProgress field.
func (o *Image) SetImportProgress(v ImageGetImportProgressRetType) {
setImageGetImportProgressAttributeType(&o.ImportProgress, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *Image) GetLabels() (res ImageGetLabelsRetType) {
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 *Image) GetLabelsOk() (ret ImageGetLabelsRetType, ok bool) {
return getImageGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *Image) 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 *Image) SetLabels(v ImageGetLabelsRetType) {
setImageGetLabelsAttributeType(&o.Labels, v)
}
// GetMinDiskSize returns the MinDiskSize field value if set, zero value otherwise.
func (o *Image) GetMinDiskSize() (res ImageGetMinDiskSizeRetType) {
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 *Image) GetMinDiskSizeOk() (ret ImageGetMinDiskSizeRetType, ok bool) {
return getImageGetMinDiskSizeAttributeTypeOk(o.MinDiskSize)
}
// HasMinDiskSize returns a boolean if a field has been set.
func (o *Image) HasMinDiskSize() bool {
_, ok := o.GetMinDiskSizeOk()
return ok
}
// SetMinDiskSize gets a reference to the given int64 and assigns it to the MinDiskSize field.
func (o *Image) SetMinDiskSize(v ImageGetMinDiskSizeRetType) {
setImageGetMinDiskSizeAttributeType(&o.MinDiskSize, v)
}
// GetMinRam returns the MinRam field value if set, zero value otherwise.
func (o *Image) GetMinRam() (res ImageGetMinRamRetType) {
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 *Image) GetMinRamOk() (ret ImageGetMinRamRetType, ok bool) {
return getImageGetMinRamAttributeTypeOk(o.MinRam)
}
// HasMinRam returns a boolean if a field has been set.
func (o *Image) HasMinRam() bool {
_, ok := o.GetMinRamOk()
return ok
}
// SetMinRam gets a reference to the given int64 and assigns it to the MinRam field.
func (o *Image) SetMinRam(v ImageGetMinRamRetType) {
setImageGetMinRamAttributeType(&o.MinRam, v)
}
// GetName returns the Name field value
func (o *Image) GetName() (ret ImageGetNameRetType) {
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 *Image) GetNameOk() (ret ImageGetNameRetType, ok bool) {
return getImageGetNameAttributeTypeOk(o.Name)
}
// SetName sets field value
func (o *Image) SetName(v ImageGetNameRetType) {
setImageGetNameAttributeType(&o.Name, v)
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *Image) GetOwner() (res ImageGetOwnerRetType) {
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 *Image) GetOwnerOk() (ret ImageGetOwnerRetType, ok bool) {
return getImageGetOwnerAttributeTypeOk(o.Owner)
}
// HasOwner returns a boolean if a field has been set.
func (o *Image) HasOwner() bool {
_, ok := o.GetOwnerOk()
return ok
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *Image) SetOwner(v ImageGetOwnerRetType) {
setImageGetOwnerAttributeType(&o.Owner, v)
}
// GetProtected returns the Protected field value if set, zero value otherwise.
func (o *Image) GetProtected() (res ImagegetProtectedRetType) {
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 *Image) GetProtectedOk() (ret ImagegetProtectedRetType, ok bool) {
return getImagegetProtectedAttributeTypeOk(o.Protected)
}
// HasProtected returns a boolean if a field has been set.
func (o *Image) HasProtected() bool {
_, ok := o.GetProtectedOk()
return ok
}
// SetProtected gets a reference to the given bool and assigns it to the Protected field.
func (o *Image) SetProtected(v ImagegetProtectedRetType) {
setImagegetProtectedAttributeType(&o.Protected, v)
}
// GetScope returns the Scope field value if set, zero value otherwise.
func (o *Image) GetScope() (res ImageGetScopeRetType) {
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 *Image) GetScopeOk() (ret ImageGetScopeRetType, ok bool) {
return getImageGetScopeAttributeTypeOk(o.Scope)
}
// HasScope returns a boolean if a field has been set.
func (o *Image) HasScope() bool {
_, ok := o.GetScopeOk()
return ok
}
// SetScope gets a reference to the given string and assigns it to the Scope field.
func (o *Image) SetScope(v ImageGetScopeRetType) {
setImageGetScopeAttributeType(&o.Scope, v)
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *Image) GetSize() (res ImageGetSizeRetType) {
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 *Image) GetSizeOk() (ret ImageGetSizeRetType, ok bool) {
return getImageGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
func (o *Image) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *Image) SetSize(v ImageGetSizeRetType) {
setImageGetSizeAttributeType(&o.Size, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *Image) GetStatus() (res ImageGetStatusRetType) {
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 *Image) GetStatusOk() (ret ImageGetStatusRetType, ok bool) {
return getImageGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *Image) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *Image) SetStatus(v ImageGetStatusRetType) {
setImageGetStatusAttributeType(&o.Status, v)
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *Image) GetUpdatedAt() (res ImageGetUpdatedAtRetType) {
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 *Image) GetUpdatedAtOk() (ret ImageGetUpdatedAtRetType, ok bool) {
return getImageGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *Image) 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 *Image) SetUpdatedAt(v ImageGetUpdatedAtRetType) {
setImageGetUpdatedAtAttributeType(&o.UpdatedAt, v)
}
func (o Image) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getImageGetAgentAttributeTypeOk(o.Agent); ok {
toSerialize["Agent"] = val
}
if val, ok := getImageGetChecksumAttributeTypeOk(o.Checksum); ok {
toSerialize["Checksum"] = val
}
if val, ok := getImageGetConfigAttributeTypeOk(o.Config); ok {
toSerialize["Config"] = val
}
if val, ok := getImageGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getImageGetDiskFormatAttributeTypeOk(o.DiskFormat); ok {
toSerialize["DiskFormat"] = val
}
if val, ok := getImageGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getImageGetImportProgressAttributeTypeOk(o.ImportProgress); ok {
toSerialize["ImportProgress"] = val
}
if val, ok := getImageGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getImageGetMinDiskSizeAttributeTypeOk(o.MinDiskSize); ok {
toSerialize["MinDiskSize"] = val
}
if val, ok := getImageGetMinRamAttributeTypeOk(o.MinRam); ok {
toSerialize["MinRam"] = val
}
if val, ok := getImageGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getImageGetOwnerAttributeTypeOk(o.Owner); ok {
toSerialize["Owner"] = val
}
if val, ok := getImagegetProtectedAttributeTypeOk(o.Protected); ok {
toSerialize["Protected"] = val
}
if val, ok := getImageGetScopeAttributeTypeOk(o.Scope); ok {
toSerialize["Scope"] = val
}
if val, ok := getImageGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
if val, ok := getImageGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getImageGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
toSerialize["UpdatedAt"] = val
}
return toSerialize, nil
}
type NullableImage struct {
value *Image
isSet bool
}
func (v NullableImage) Get() *Image {
return v.value
}
func (v *NullableImage) Set(val *Image) {
v.value = val
v.isSet = true
}
func (v NullableImage) IsSet() bool {
return v.isSet
}
func (v *NullableImage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableImage(val *Image) *NullableImage {
return &NullableImage{value: val, isSet: true}
}
func (v NullableImage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableImage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}