terraform-provider-stackitp.../pkg/sfsbeta/model_create_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 CreateShareResponseShare type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateShareResponseShare{}
/*
types and functions for createdAt
*/
// isDateTime
type CreateShareResponseShareGetCreatedAtAttributeType = *time.Time
type CreateShareResponseShareGetCreatedAtArgType = time.Time
type CreateShareResponseShareGetCreatedAtRetType = time.Time
func getCreateShareResponseShareGetCreatedAtAttributeTypeOk(arg CreateShareResponseShareGetCreatedAtAttributeType) (ret CreateShareResponseShareGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetCreatedAtAttributeType(arg *CreateShareResponseShareGetCreatedAtAttributeType, val CreateShareResponseShareGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for exportPolicy
*/
// isModel
type CreateShareResponseShareGetExportPolicyAttributeType = *NullableShareExportPolicy
type CreateShareResponseShareGetExportPolicyArgType = *NullableShareExportPolicy
type CreateShareResponseShareGetExportPolicyRetType = *NullableShareExportPolicy
func getCreateShareResponseShareGetExportPolicyAttributeTypeOk(arg CreateShareResponseShareGetExportPolicyAttributeType) (ret CreateShareResponseShareGetExportPolicyRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setCreateShareResponseShareGetExportPolicyAttributeType(arg *CreateShareResponseShareGetExportPolicyAttributeType, val CreateShareResponseShareGetExportPolicyRetType) {
*arg = val
}
/*
types and functions for id
*/
// isNotNullableString
type CreateShareResponseShareGetIdAttributeType = *string
func getCreateShareResponseShareGetIdAttributeTypeOk(arg CreateShareResponseShareGetIdAttributeType) (ret CreateShareResponseShareGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetIdAttributeType(arg *CreateShareResponseShareGetIdAttributeType, val CreateShareResponseShareGetIdRetType) {
*arg = &val
}
type CreateShareResponseShareGetIdArgType = string
type CreateShareResponseShareGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type CreateShareResponseShareGetLabelsAttributeType = *map[string]string
type CreateShareResponseShareGetLabelsArgType = map[string]string
type CreateShareResponseShareGetLabelsRetType = map[string]string
func getCreateShareResponseShareGetLabelsAttributeTypeOk(arg CreateShareResponseShareGetLabelsAttributeType) (ret CreateShareResponseShareGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetLabelsAttributeType(arg *CreateShareResponseShareGetLabelsAttributeType, val CreateShareResponseShareGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type CreateShareResponseShareGetMountPathAttributeType = *string
func getCreateShareResponseShareGetMountPathAttributeTypeOk(arg CreateShareResponseShareGetMountPathAttributeType) (ret CreateShareResponseShareGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetMountPathAttributeType(arg *CreateShareResponseShareGetMountPathAttributeType, val CreateShareResponseShareGetMountPathRetType) {
*arg = &val
}
type CreateShareResponseShareGetMountPathArgType = string
type CreateShareResponseShareGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type CreateShareResponseShareGetNameAttributeType = *string
func getCreateShareResponseShareGetNameAttributeTypeOk(arg CreateShareResponseShareGetNameAttributeType) (ret CreateShareResponseShareGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetNameAttributeType(arg *CreateShareResponseShareGetNameAttributeType, val CreateShareResponseShareGetNameRetType) {
*arg = &val
}
type CreateShareResponseShareGetNameArgType = string
type CreateShareResponseShareGetNameRetType = string
/*
types and functions for spaceHardLimitGigabytes
*/
// isInteger
type CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType = *int64
type CreateShareResponseShareGetSpaceHardLimitGigabytesArgType = int64
type CreateShareResponseShareGetSpaceHardLimitGigabytesRetType = int64
func getCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType) (ret CreateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType, val CreateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type CreateShareResponseShareGetStateAttributeType = *string
func getCreateShareResponseShareGetStateAttributeTypeOk(arg CreateShareResponseShareGetStateAttributeType) (ret CreateShareResponseShareGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetStateAttributeType(arg *CreateShareResponseShareGetStateAttributeType, val CreateShareResponseShareGetStateRetType) {
*arg = &val
}
type CreateShareResponseShareGetStateArgType = string
type CreateShareResponseShareGetStateRetType = string
// CreateShareResponseShare Created Share
type CreateShareResponseShare struct {
CreatedAt CreateShareResponseShareGetCreatedAtAttributeType `json:"createdAt,omitempty"`
ExportPolicy CreateShareResponseShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"`
// ID of the Share
Id CreateShareResponseShareGetIdAttributeType `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 CreateShareResponseShareGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Share, used to mount the Share
MountPath CreateShareResponseShareGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Share
Name CreateShareResponseShareGetNameAttributeType `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 CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes,omitempty"`
// State of the Resource Pool Snapshot (possible values: [\"pending\", \"creating\", \"created\", \"error\", \"deleting\"])
State CreateShareResponseShareGetStateAttributeType `json:"state,omitempty"`
}
// NewCreateShareResponseShare instantiates a new CreateShareResponseShare 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 NewCreateShareResponseShare() *CreateShareResponseShare {
this := CreateShareResponseShare{}
return &this
}
// NewCreateShareResponseShareWithDefaults instantiates a new CreateShareResponseShare 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 NewCreateShareResponseShareWithDefaults() *CreateShareResponseShare {
this := CreateShareResponseShare{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetCreatedAt() (res CreateShareResponseShareGetCreatedAtRetType) {
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 *CreateShareResponseShare) GetCreatedAtOk() (ret CreateShareResponseShareGetCreatedAtRetType, ok bool) {
return getCreateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *CreateShareResponseShare) 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 *CreateShareResponseShare) SetCreatedAt(v CreateShareResponseShareGetCreatedAtRetType) {
setCreateShareResponseShareGetCreatedAtAttributeType(&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 *CreateShareResponseShare) GetExportPolicy() (res CreateShareResponseShareGetExportPolicyRetType) {
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 *CreateShareResponseShare) GetExportPolicyOk() (ret CreateShareResponseShareGetExportPolicyRetType, ok bool) {
return getCreateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy)
}
// HasExportPolicy returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasExportPolicy() bool {
_, ok := o.GetExportPolicyOk()
return ok
}
// SetExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ExportPolicy field.
func (o *CreateShareResponseShare) SetExportPolicy(v CreateShareResponseShareGetExportPolicyRetType) {
setCreateShareResponseShareGetExportPolicyAttributeType(&o.ExportPolicy, v)
}
// SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil
func (o *CreateShareResponseShare) SetExportPolicyNil() {
o.ExportPolicy = nil
}
// UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil
func (o *CreateShareResponseShare) UnsetExportPolicy() {
o.ExportPolicy = nil
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetId() (res CreateShareResponseShareGetIdRetType) {
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 *CreateShareResponseShare) GetIdOk() (ret CreateShareResponseShareGetIdRetType, ok bool) {
return getCreateShareResponseShareGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *CreateShareResponseShare) SetId(v CreateShareResponseShareGetIdRetType) {
setCreateShareResponseShareGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetLabels() (res CreateShareResponseShareGetLabelsRetType) {
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 *CreateShareResponseShare) GetLabelsOk() (ret CreateShareResponseShareGetLabelsRetType, ok bool) {
return getCreateShareResponseShareGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateShareResponseShare) 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 *CreateShareResponseShare) SetLabels(v CreateShareResponseShareGetLabelsRetType) {
setCreateShareResponseShareGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetMountPath() (res CreateShareResponseShareGetMountPathRetType) {
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 *CreateShareResponseShare) GetMountPathOk() (ret CreateShareResponseShareGetMountPathRetType, ok bool) {
return getCreateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *CreateShareResponseShare) SetMountPath(v CreateShareResponseShareGetMountPathRetType) {
setCreateShareResponseShareGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetName() (res CreateShareResponseShareGetNameRetType) {
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 *CreateShareResponseShare) GetNameOk() (ret CreateShareResponseShareGetNameRetType, ok bool) {
return getCreateShareResponseShareGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateShareResponseShare) SetName(v CreateShareResponseShareGetNameRetType) {
setCreateShareResponseShareGetNameAttributeType(&o.Name, v)
}
// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetSpaceHardLimitGigabytes() (res CreateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
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 *CreateShareResponseShare) GetSpaceHardLimitGigabytesOk() (ret CreateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
return getCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes)
}
// HasSpaceHardLimitGigabytes returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasSpaceHardLimitGigabytes() bool {
_, ok := o.GetSpaceHardLimitGigabytesOk()
return ok
}
// SetSpaceHardLimitGigabytes gets a reference to the given int64 and assigns it to the SpaceHardLimitGigabytes field.
func (o *CreateShareResponseShare) SetSpaceHardLimitGigabytes(v CreateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
setCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetState() (res CreateShareResponseShareGetStateRetType) {
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 *CreateShareResponseShare) GetStateOk() (ret CreateShareResponseShareGetStateRetType, ok bool) {
return getCreateShareResponseShareGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *CreateShareResponseShare) SetState(v CreateShareResponseShareGetStateRetType) {
setCreateShareResponseShareGetStateAttributeType(&o.State, v)
}
func (o CreateShareResponseShare) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getCreateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy); ok {
toSerialize["ExportPolicy"] = val
}
if val, ok := getCreateShareResponseShareGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getCreateShareResponseShareGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getCreateShareResponseShareGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes); ok {
toSerialize["SpaceHardLimitGigabytes"] = val
}
if val, ok := getCreateShareResponseShareGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableCreateShareResponseShare struct {
value *CreateShareResponseShare
isSet bool
}
func (v NullableCreateShareResponseShare) Get() *CreateShareResponseShare {
return v.value
}
func (v *NullableCreateShareResponseShare) Set(val *CreateShareResponseShare) {
v.value = val
v.isSet = true
}
func (v NullableCreateShareResponseShare) IsSet() bool {
return v.isSet
}
func (v *NullableCreateShareResponseShare) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateShareResponseShare(val *CreateShareResponseShare) *NullableCreateShareResponseShare {
return &NullableCreateShareResponseShare{value: val, isSet: true}
}
func (v NullableCreateShareResponseShare) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateShareResponseShare) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}