479 lines
17 KiB
Go
479 lines
17 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 GetShareResponseShare type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GetShareResponseShare{}
|
|
|
|
/*
|
|
types and functions for createdAt
|
|
*/
|
|
|
|
// isDateTime
|
|
type GetShareResponseShareGetCreatedAtAttributeType = *time.Time
|
|
type GetShareResponseShareGetCreatedAtArgType = time.Time
|
|
type GetShareResponseShareGetCreatedAtRetType = time.Time
|
|
|
|
func getGetShareResponseShareGetCreatedAtAttributeTypeOk(arg GetShareResponseShareGetCreatedAtAttributeType) (ret GetShareResponseShareGetCreatedAtRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetShareResponseShareGetCreatedAtAttributeType(arg *GetShareResponseShareGetCreatedAtAttributeType, val GetShareResponseShareGetCreatedAtRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for exportPolicy
|
|
*/
|
|
|
|
// isModel
|
|
type GetShareResponseShareGetExportPolicyAttributeType = *NullableShareExportPolicy
|
|
type GetShareResponseShareGetExportPolicyArgType = *NullableShareExportPolicy
|
|
type GetShareResponseShareGetExportPolicyRetType = *NullableShareExportPolicy
|
|
|
|
func getGetShareResponseShareGetExportPolicyAttributeTypeOk(arg GetShareResponseShareGetExportPolicyAttributeType) (ret GetShareResponseShareGetExportPolicyRetType, ok bool) {
|
|
if arg == nil {
|
|
return nil, false
|
|
}
|
|
return arg, true
|
|
}
|
|
|
|
func setGetShareResponseShareGetExportPolicyAttributeType(arg *GetShareResponseShareGetExportPolicyAttributeType, val GetShareResponseShareGetExportPolicyRetType) {
|
|
*arg = val
|
|
}
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetShareResponseShareGetIdAttributeType = *string
|
|
|
|
func getGetShareResponseShareGetIdAttributeTypeOk(arg GetShareResponseShareGetIdAttributeType) (ret GetShareResponseShareGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetShareResponseShareGetIdAttributeType(arg *GetShareResponseShareGetIdAttributeType, val GetShareResponseShareGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetShareResponseShareGetIdArgType = string
|
|
type GetShareResponseShareGetIdRetType = string
|
|
|
|
/*
|
|
types and functions for labels
|
|
*/
|
|
|
|
// isContainer
|
|
type GetShareResponseShareGetLabelsAttributeType = *map[string]string
|
|
type GetShareResponseShareGetLabelsArgType = map[string]string
|
|
type GetShareResponseShareGetLabelsRetType = map[string]string
|
|
|
|
func getGetShareResponseShareGetLabelsAttributeTypeOk(arg GetShareResponseShareGetLabelsAttributeType) (ret GetShareResponseShareGetLabelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetShareResponseShareGetLabelsAttributeType(arg *GetShareResponseShareGetLabelsAttributeType, val GetShareResponseShareGetLabelsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for mountPath
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetShareResponseShareGetMountPathAttributeType = *string
|
|
|
|
func getGetShareResponseShareGetMountPathAttributeTypeOk(arg GetShareResponseShareGetMountPathAttributeType) (ret GetShareResponseShareGetMountPathRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetShareResponseShareGetMountPathAttributeType(arg *GetShareResponseShareGetMountPathAttributeType, val GetShareResponseShareGetMountPathRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetShareResponseShareGetMountPathArgType = string
|
|
type GetShareResponseShareGetMountPathRetType = string
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetShareResponseShareGetNameAttributeType = *string
|
|
|
|
func getGetShareResponseShareGetNameAttributeTypeOk(arg GetShareResponseShareGetNameAttributeType) (ret GetShareResponseShareGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetShareResponseShareGetNameAttributeType(arg *GetShareResponseShareGetNameAttributeType, val GetShareResponseShareGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetShareResponseShareGetNameArgType = string
|
|
type GetShareResponseShareGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for spaceHardLimitGigabytes
|
|
*/
|
|
|
|
// isInteger
|
|
type GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType = *int64
|
|
type GetShareResponseShareGetSpaceHardLimitGigabytesArgType = int64
|
|
type GetShareResponseShareGetSpaceHardLimitGigabytesRetType = int64
|
|
|
|
func getGetShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType) (ret GetShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType, val GetShareResponseShareGetSpaceHardLimitGigabytesRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for state
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetShareResponseShareGetStateAttributeType = *string
|
|
|
|
func getGetShareResponseShareGetStateAttributeTypeOk(arg GetShareResponseShareGetStateAttributeType) (ret GetShareResponseShareGetStateRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetShareResponseShareGetStateAttributeType(arg *GetShareResponseShareGetStateAttributeType, val GetShareResponseShareGetStateRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetShareResponseShareGetStateArgType = string
|
|
type GetShareResponseShareGetStateRetType = string
|
|
|
|
// GetShareResponseShare Share
|
|
type GetShareResponseShare struct {
|
|
CreatedAt GetShareResponseShareGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
|
ExportPolicy GetShareResponseShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"`
|
|
// ID of the Share
|
|
Id GetShareResponseShareGetIdAttributeType `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 GetShareResponseShareGetLabelsAttributeType `json:"labels,omitempty"`
|
|
// Mount path of the Share, used to mount the Share
|
|
MountPath GetShareResponseShareGetMountPathAttributeType `json:"mountPath,omitempty"`
|
|
// Name of the Share
|
|
Name GetShareResponseShareGetNameAttributeType `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 GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes,omitempty"`
|
|
// State of the Resource Pool Snapshot (possible values: [\"pending\", \"creating\", \"created\", \"error\", \"deleting\"])
|
|
State GetShareResponseShareGetStateAttributeType `json:"state,omitempty"`
|
|
}
|
|
|
|
// NewGetShareResponseShare instantiates a new GetShareResponseShare 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 NewGetShareResponseShare() *GetShareResponseShare {
|
|
this := GetShareResponseShare{}
|
|
return &this
|
|
}
|
|
|
|
// NewGetShareResponseShareWithDefaults instantiates a new GetShareResponseShare 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 NewGetShareResponseShareWithDefaults() *GetShareResponseShare {
|
|
this := GetShareResponseShare{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *GetShareResponseShare) GetCreatedAt() (res GetShareResponseShareGetCreatedAtRetType) {
|
|
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 *GetShareResponseShare) GetCreatedAtOk() (ret GetShareResponseShareGetCreatedAtRetType, ok bool) {
|
|
return getGetShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *GetShareResponseShare) 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 *GetShareResponseShare) SetCreatedAt(v GetShareResponseShareGetCreatedAtRetType) {
|
|
setGetShareResponseShareGetCreatedAtAttributeType(&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 *GetShareResponseShare) GetExportPolicy() (res GetShareResponseShareGetExportPolicyRetType) {
|
|
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 *GetShareResponseShare) GetExportPolicyOk() (ret GetShareResponseShareGetExportPolicyRetType, ok bool) {
|
|
return getGetShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy)
|
|
}
|
|
|
|
// HasExportPolicy returns a boolean if a field has been set.
|
|
func (o *GetShareResponseShare) HasExportPolicy() bool {
|
|
_, ok := o.GetExportPolicyOk()
|
|
return ok
|
|
}
|
|
|
|
// SetExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ExportPolicy field.
|
|
func (o *GetShareResponseShare) SetExportPolicy(v GetShareResponseShareGetExportPolicyRetType) {
|
|
setGetShareResponseShareGetExportPolicyAttributeType(&o.ExportPolicy, v)
|
|
}
|
|
|
|
// SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil
|
|
func (o *GetShareResponseShare) SetExportPolicyNil() {
|
|
o.ExportPolicy = nil
|
|
}
|
|
|
|
// UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil
|
|
func (o *GetShareResponseShare) UnsetExportPolicy() {
|
|
o.ExportPolicy = nil
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *GetShareResponseShare) GetId() (res GetShareResponseShareGetIdRetType) {
|
|
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 *GetShareResponseShare) GetIdOk() (ret GetShareResponseShareGetIdRetType, ok bool) {
|
|
return getGetShareResponseShareGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *GetShareResponseShare) HasId() bool {
|
|
_, ok := o.GetIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *GetShareResponseShare) SetId(v GetShareResponseShareGetIdRetType) {
|
|
setGetShareResponseShareGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *GetShareResponseShare) GetLabels() (res GetShareResponseShareGetLabelsRetType) {
|
|
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 *GetShareResponseShare) GetLabelsOk() (ret GetShareResponseShareGetLabelsRetType, ok bool) {
|
|
return getGetShareResponseShareGetLabelsAttributeTypeOk(o.Labels)
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *GetShareResponseShare) 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 *GetShareResponseShare) SetLabels(v GetShareResponseShareGetLabelsRetType) {
|
|
setGetShareResponseShareGetLabelsAttributeType(&o.Labels, v)
|
|
}
|
|
|
|
// GetMountPath returns the MountPath field value if set, zero value otherwise.
|
|
func (o *GetShareResponseShare) GetMountPath() (res GetShareResponseShareGetMountPathRetType) {
|
|
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 *GetShareResponseShare) GetMountPathOk() (ret GetShareResponseShareGetMountPathRetType, ok bool) {
|
|
return getGetShareResponseShareGetMountPathAttributeTypeOk(o.MountPath)
|
|
}
|
|
|
|
// HasMountPath returns a boolean if a field has been set.
|
|
func (o *GetShareResponseShare) HasMountPath() bool {
|
|
_, ok := o.GetMountPathOk()
|
|
return ok
|
|
}
|
|
|
|
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
|
|
func (o *GetShareResponseShare) SetMountPath(v GetShareResponseShareGetMountPathRetType) {
|
|
setGetShareResponseShareGetMountPathAttributeType(&o.MountPath, v)
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *GetShareResponseShare) GetName() (res GetShareResponseShareGetNameRetType) {
|
|
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 *GetShareResponseShare) GetNameOk() (ret GetShareResponseShareGetNameRetType, ok bool) {
|
|
return getGetShareResponseShareGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *GetShareResponseShare) HasName() bool {
|
|
_, ok := o.GetNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *GetShareResponseShare) SetName(v GetShareResponseShareGetNameRetType) {
|
|
setGetShareResponseShareGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise.
|
|
func (o *GetShareResponseShare) GetSpaceHardLimitGigabytes() (res GetShareResponseShareGetSpaceHardLimitGigabytesRetType) {
|
|
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 *GetShareResponseShare) GetSpaceHardLimitGigabytesOk() (ret GetShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
|
|
return getGetShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes)
|
|
}
|
|
|
|
// HasSpaceHardLimitGigabytes returns a boolean if a field has been set.
|
|
func (o *GetShareResponseShare) HasSpaceHardLimitGigabytes() bool {
|
|
_, ok := o.GetSpaceHardLimitGigabytesOk()
|
|
return ok
|
|
}
|
|
|
|
// SetSpaceHardLimitGigabytes gets a reference to the given int64 and assigns it to the SpaceHardLimitGigabytes field.
|
|
func (o *GetShareResponseShare) SetSpaceHardLimitGigabytes(v GetShareResponseShareGetSpaceHardLimitGigabytesRetType) {
|
|
setGetShareResponseShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v)
|
|
}
|
|
|
|
// GetState returns the State field value if set, zero value otherwise.
|
|
func (o *GetShareResponseShare) GetState() (res GetShareResponseShareGetStateRetType) {
|
|
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 *GetShareResponseShare) GetStateOk() (ret GetShareResponseShareGetStateRetType, ok bool) {
|
|
return getGetShareResponseShareGetStateAttributeTypeOk(o.State)
|
|
}
|
|
|
|
// HasState returns a boolean if a field has been set.
|
|
func (o *GetShareResponseShare) HasState() bool {
|
|
_, ok := o.GetStateOk()
|
|
return ok
|
|
}
|
|
|
|
// SetState gets a reference to the given string and assigns it to the State field.
|
|
func (o *GetShareResponseShare) SetState(v GetShareResponseShareGetStateRetType) {
|
|
setGetShareResponseShareGetStateAttributeType(&o.State, v)
|
|
}
|
|
|
|
func (o GetShareResponseShare) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getGetShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
|
toSerialize["CreatedAt"] = val
|
|
}
|
|
if val, ok := getGetShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy); ok {
|
|
toSerialize["ExportPolicy"] = val
|
|
}
|
|
if val, ok := getGetShareResponseShareGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getGetShareResponseShareGetLabelsAttributeTypeOk(o.Labels); ok {
|
|
toSerialize["Labels"] = val
|
|
}
|
|
if val, ok := getGetShareResponseShareGetMountPathAttributeTypeOk(o.MountPath); ok {
|
|
toSerialize["MountPath"] = val
|
|
}
|
|
if val, ok := getGetShareResponseShareGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getGetShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes); ok {
|
|
toSerialize["SpaceHardLimitGigabytes"] = val
|
|
}
|
|
if val, ok := getGetShareResponseShareGetStateAttributeTypeOk(o.State); ok {
|
|
toSerialize["State"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableGetShareResponseShare struct {
|
|
value *GetShareResponseShare
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGetShareResponseShare) Get() *GetShareResponseShare {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGetShareResponseShare) Set(val *GetShareResponseShare) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGetShareResponseShare) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGetShareResponseShare) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGetShareResponseShare(val *GetShareResponseShare) *NullableGetShareResponseShare {
|
|
return &NullableGetShareResponseShare{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGetShareResponseShare) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGetShareResponseShare) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|