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

479 lines
18 KiB
Go

/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the UpdateShareResponseShare type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateShareResponseShare{}
/*
types and functions for createdAt
*/
// isDateTime
type UpdateShareResponseShareGetCreatedAtAttributeType = *time.Time
type UpdateShareResponseShareGetCreatedAtArgType = time.Time
type UpdateShareResponseShareGetCreatedAtRetType = time.Time
func getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(arg UpdateShareResponseShareGetCreatedAtAttributeType) (ret UpdateShareResponseShareGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetCreatedAtAttributeType(arg *UpdateShareResponseShareGetCreatedAtAttributeType, val UpdateShareResponseShareGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for exportPolicy
*/
// isModel
type UpdateShareResponseShareGetExportPolicyAttributeType = *NullableShareExportPolicy
type UpdateShareResponseShareGetExportPolicyArgType = *NullableShareExportPolicy
type UpdateShareResponseShareGetExportPolicyRetType = *NullableShareExportPolicy
func getUpdateShareResponseShareGetExportPolicyAttributeTypeOk(arg UpdateShareResponseShareGetExportPolicyAttributeType) (ret UpdateShareResponseShareGetExportPolicyRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setUpdateShareResponseShareGetExportPolicyAttributeType(arg *UpdateShareResponseShareGetExportPolicyAttributeType, val UpdateShareResponseShareGetExportPolicyRetType) {
*arg = val
}
/*
types and functions for id
*/
// isNotNullableString
type UpdateShareResponseShareGetIdAttributeType = *string
func getUpdateShareResponseShareGetIdAttributeTypeOk(arg UpdateShareResponseShareGetIdAttributeType) (ret UpdateShareResponseShareGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetIdAttributeType(arg *UpdateShareResponseShareGetIdAttributeType, val UpdateShareResponseShareGetIdRetType) {
*arg = &val
}
type UpdateShareResponseShareGetIdArgType = string
type UpdateShareResponseShareGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type UpdateShareResponseShareGetLabelsAttributeType = *map[string]string
type UpdateShareResponseShareGetLabelsArgType = map[string]string
type UpdateShareResponseShareGetLabelsRetType = map[string]string
func getUpdateShareResponseShareGetLabelsAttributeTypeOk(arg UpdateShareResponseShareGetLabelsAttributeType) (ret UpdateShareResponseShareGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetLabelsAttributeType(arg *UpdateShareResponseShareGetLabelsAttributeType, val UpdateShareResponseShareGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type UpdateShareResponseShareGetMountPathAttributeType = *string
func getUpdateShareResponseShareGetMountPathAttributeTypeOk(arg UpdateShareResponseShareGetMountPathAttributeType) (ret UpdateShareResponseShareGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetMountPathAttributeType(arg *UpdateShareResponseShareGetMountPathAttributeType, val UpdateShareResponseShareGetMountPathRetType) {
*arg = &val
}
type UpdateShareResponseShareGetMountPathArgType = string
type UpdateShareResponseShareGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type UpdateShareResponseShareGetNameAttributeType = *string
func getUpdateShareResponseShareGetNameAttributeTypeOk(arg UpdateShareResponseShareGetNameAttributeType) (ret UpdateShareResponseShareGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetNameAttributeType(arg *UpdateShareResponseShareGetNameAttributeType, val UpdateShareResponseShareGetNameRetType) {
*arg = &val
}
type UpdateShareResponseShareGetNameArgType = string
type UpdateShareResponseShareGetNameRetType = string
/*
types and functions for spaceHardLimitGigabytes
*/
// isInteger
type UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType = *int64
type UpdateShareResponseShareGetSpaceHardLimitGigabytesArgType = int64
type UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType = int64
func getUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType) (ret UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType, val UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type UpdateShareResponseShareGetStateAttributeType = *string
func getUpdateShareResponseShareGetStateAttributeTypeOk(arg UpdateShareResponseShareGetStateAttributeType) (ret UpdateShareResponseShareGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetStateAttributeType(arg *UpdateShareResponseShareGetStateAttributeType, val UpdateShareResponseShareGetStateRetType) {
*arg = &val
}
type UpdateShareResponseShareGetStateArgType = string
type UpdateShareResponseShareGetStateRetType = string
// UpdateShareResponseShare Updated Share
type UpdateShareResponseShare struct {
CreatedAt UpdateShareResponseShareGetCreatedAtAttributeType `json:"createdAt,omitempty"`
ExportPolicy UpdateShareResponseShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"`
// ID of the Share
Id UpdateShareResponseShareGetIdAttributeType `json:"id,omitempty"`
// An optional object that represents the labels associated with the share keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels UpdateShareResponseShareGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Share, used to mount the Share
MountPath UpdateShareResponseShareGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Share
Name UpdateShareResponseShareGetNameAttributeType `json:"name,omitempty"`
// Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes)
// Can be cast to int32 without loss of precision.
SpaceHardLimitGigabytes UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes,omitempty"`
// State of the Resource Pool Snapshot (possible values: [\"pending\", \"creating\", \"created\", \"error\", \"deleting\"])
State UpdateShareResponseShareGetStateAttributeType `json:"state,omitempty"`
}
// NewUpdateShareResponseShare instantiates a new UpdateShareResponseShare 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 NewUpdateShareResponseShare() *UpdateShareResponseShare {
this := UpdateShareResponseShare{}
return &this
}
// NewUpdateShareResponseShareWithDefaults instantiates a new UpdateShareResponseShare 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 NewUpdateShareResponseShareWithDefaults() *UpdateShareResponseShare {
this := UpdateShareResponseShare{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetCreatedAt() (res UpdateShareResponseShareGetCreatedAtRetType) {
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 *UpdateShareResponseShare) GetCreatedAtOk() (ret UpdateShareResponseShareGetCreatedAtRetType, ok bool) {
return getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) 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 *UpdateShareResponseShare) SetCreatedAt(v UpdateShareResponseShareGetCreatedAtRetType) {
setUpdateShareResponseShareGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetExportPolicy returns the ExportPolicy field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateShareResponseShare) GetExportPolicy() (res UpdateShareResponseShareGetExportPolicyRetType) {
res, _ = o.GetExportPolicyOk()
return
}
// GetExportPolicyOk returns a tuple with the ExportPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UpdateShareResponseShare) GetExportPolicyOk() (ret UpdateShareResponseShareGetExportPolicyRetType, ok bool) {
return getUpdateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy)
}
// HasExportPolicy returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasExportPolicy() bool {
_, ok := o.GetExportPolicyOk()
return ok
}
// SetExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ExportPolicy field.
func (o *UpdateShareResponseShare) SetExportPolicy(v UpdateShareResponseShareGetExportPolicyRetType) {
setUpdateShareResponseShareGetExportPolicyAttributeType(&o.ExportPolicy, v)
}
// SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil
func (o *UpdateShareResponseShare) SetExportPolicyNil() {
o.ExportPolicy = nil
}
// UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil
func (o *UpdateShareResponseShare) UnsetExportPolicy() {
o.ExportPolicy = nil
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetId() (res UpdateShareResponseShareGetIdRetType) {
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 *UpdateShareResponseShare) GetIdOk() (ret UpdateShareResponseShareGetIdRetType, ok bool) {
return getUpdateShareResponseShareGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *UpdateShareResponseShare) SetId(v UpdateShareResponseShareGetIdRetType) {
setUpdateShareResponseShareGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetLabels() (res UpdateShareResponseShareGetLabelsRetType) {
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 *UpdateShareResponseShare) GetLabelsOk() (ret UpdateShareResponseShareGetLabelsRetType, ok bool) {
return getUpdateShareResponseShareGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *UpdateShareResponseShare) SetLabels(v UpdateShareResponseShareGetLabelsRetType) {
setUpdateShareResponseShareGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetMountPath() (res UpdateShareResponseShareGetMountPathRetType) {
res, _ = o.GetMountPathOk()
return
}
// GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareResponseShare) GetMountPathOk() (ret UpdateShareResponseShareGetMountPathRetType, ok bool) {
return getUpdateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *UpdateShareResponseShare) SetMountPath(v UpdateShareResponseShareGetMountPathRetType) {
setUpdateShareResponseShareGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetName() (res UpdateShareResponseShareGetNameRetType) {
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 *UpdateShareResponseShare) GetNameOk() (ret UpdateShareResponseShareGetNameRetType, ok bool) {
return getUpdateShareResponseShareGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *UpdateShareResponseShare) SetName(v UpdateShareResponseShareGetNameRetType) {
setUpdateShareResponseShareGetNameAttributeType(&o.Name, v)
}
// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetSpaceHardLimitGigabytes() (res UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
res, _ = o.GetSpaceHardLimitGigabytesOk()
return
}
// GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareResponseShare) GetSpaceHardLimitGigabytesOk() (ret UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
return getUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes)
}
// HasSpaceHardLimitGigabytes returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasSpaceHardLimitGigabytes() bool {
_, ok := o.GetSpaceHardLimitGigabytesOk()
return ok
}
// SetSpaceHardLimitGigabytes gets a reference to the given int64 and assigns it to the SpaceHardLimitGigabytes field.
func (o *UpdateShareResponseShare) SetSpaceHardLimitGigabytes(v UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
setUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetState() (res UpdateShareResponseShareGetStateRetType) {
res, _ = o.GetStateOk()
return
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareResponseShare) GetStateOk() (ret UpdateShareResponseShareGetStateRetType, ok bool) {
return getUpdateShareResponseShareGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *UpdateShareResponseShare) SetState(v UpdateShareResponseShareGetStateRetType) {
setUpdateShareResponseShareGetStateAttributeType(&o.State, v)
}
func (o UpdateShareResponseShare) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getUpdateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy); ok {
toSerialize["ExportPolicy"] = val
}
if val, ok := getUpdateShareResponseShareGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getUpdateShareResponseShareGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getUpdateShareResponseShareGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes); ok {
toSerialize["SpaceHardLimitGigabytes"] = val
}
if val, ok := getUpdateShareResponseShareGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableUpdateShareResponseShare struct {
value *UpdateShareResponseShare
isSet bool
}
func (v NullableUpdateShareResponseShare) Get() *UpdateShareResponseShare {
return v.value
}
func (v *NullableUpdateShareResponseShare) Set(val *UpdateShareResponseShare) {
v.value = val
v.isSet = true
}
func (v NullableUpdateShareResponseShare) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateShareResponseShare) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateShareResponseShare(val *UpdateShareResponseShare) *NullableUpdateShareResponseShare {
return &NullableUpdateShareResponseShare{value: val, isSet: true}
}
func (v NullableUpdateShareResponseShare) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateShareResponseShare) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}