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

382 lines
16 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"
)
// checks if the UpdateResourcePoolPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateResourcePoolPayload{}
/*
types and functions for ipAcl
*/
// isArray
type UpdateResourcePoolPayloadGetIpAclAttributeType = *[]string
type UpdateResourcePoolPayloadGetIpAclArgType = []string
type UpdateResourcePoolPayloadGetIpAclRetType = []string
func getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(arg UpdateResourcePoolPayloadGetIpAclAttributeType) (ret UpdateResourcePoolPayloadGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadGetIpAclAttributeType(arg *UpdateResourcePoolPayloadGetIpAclAttributeType, val UpdateResourcePoolPayloadGetIpAclRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isContainer
type UpdateResourcePoolPayloadGetLabelsAttributeType = *map[string]string
type UpdateResourcePoolPayloadGetLabelsArgType = map[string]string
type UpdateResourcePoolPayloadGetLabelsRetType = map[string]string
func getUpdateResourcePoolPayloadGetLabelsAttributeTypeOk(arg UpdateResourcePoolPayloadGetLabelsAttributeType) (ret UpdateResourcePoolPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadGetLabelsAttributeType(arg *UpdateResourcePoolPayloadGetLabelsAttributeType, val UpdateResourcePoolPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for performanceClass
*/
// isNotNullableString
type UpdateResourcePoolPayloadGetPerformanceClassAttributeType = *string
func getUpdateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(arg UpdateResourcePoolPayloadGetPerformanceClassAttributeType) (ret UpdateResourcePoolPayloadGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadGetPerformanceClassAttributeType(arg *UpdateResourcePoolPayloadGetPerformanceClassAttributeType, val UpdateResourcePoolPayloadGetPerformanceClassRetType) {
*arg = &val
}
type UpdateResourcePoolPayloadGetPerformanceClassArgType = string
type UpdateResourcePoolPayloadGetPerformanceClassRetType = string
/*
types and functions for sizeGigabytes
*/
// isInteger
type UpdateResourcePoolPayloadGetSizeGigabytesAttributeType = *int64
type UpdateResourcePoolPayloadGetSizeGigabytesArgType = *int64
type UpdateResourcePoolPayloadGetSizeGigabytesRetType = *int64
func getUpdateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(arg UpdateResourcePoolPayloadGetSizeGigabytesAttributeType) (ret UpdateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setUpdateResourcePoolPayloadGetSizeGigabytesAttributeType(arg *UpdateResourcePoolPayloadGetSizeGigabytesAttributeType, val UpdateResourcePoolPayloadGetSizeGigabytesRetType) {
*arg = val
}
/*
types and functions for snapshotScheduleName
*/
// isNotNullableString
type UpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType = *string
func getUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeTypeOk(arg UpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType) (ret UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType(arg *UpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType, val UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType) {
*arg = &val
}
type UpdateResourcePoolPayloadGetSnapshotScheduleNameArgType = string
type UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType = string
/*
types and functions for snapshotsAreVisible
*/
// isBoolean
type UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType = *bool
type UpdateResourcePoolPayloadgetSnapshotsAreVisibleArgType = bool
type UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType = bool
func getUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(arg UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType) (ret UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(arg *UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType, val UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) {
*arg = &val
}
// UpdateResourcePoolPayload struct for UpdateResourcePoolPayload
type UpdateResourcePoolPayload struct {
// (optional) List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.250/32\" for a specific IP)
IpAcl UpdateResourcePoolPayloadGetIpAclAttributeType `json:"ipAcl,omitempty"`
// An optional object that represents the labels associated with the resource pool 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 UpdateResourcePoolPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// (optional) Name of the performance class
PerformanceClass UpdateResourcePoolPayloadGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// (optional) Size of the Resource Pool (unit: gigabytes)
// Can be cast to int32 without loss of precision.
SizeGigabytes UpdateResourcePoolPayloadGetSizeGigabytesAttributeType `json:"sizeGigabytes,omitempty"`
// (optional) Name of the Snapshot Schedule to use If not set, the Snapshot Schedule is not updated If set to an empty string, the Snapshot Schedule is removed
SnapshotScheduleName UpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType `json:"snapshotScheduleName,omitempty"`
// Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares.
SnapshotsAreVisible UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType `json:"snapshotsAreVisible,omitempty"`
}
// NewUpdateResourcePoolPayload instantiates a new UpdateResourcePoolPayload 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 NewUpdateResourcePoolPayload() *UpdateResourcePoolPayload {
this := UpdateResourcePoolPayload{}
return &this
}
// NewUpdateResourcePoolPayloadWithDefaults instantiates a new UpdateResourcePoolPayload 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 NewUpdateResourcePoolPayloadWithDefaults() *UpdateResourcePoolPayload {
this := UpdateResourcePoolPayload{}
return &this
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetIpAcl() (res UpdateResourcePoolPayloadGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolPayload) GetIpAclOk() (ret UpdateResourcePoolPayloadGetIpAclRetType, ok bool) {
return getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *UpdateResourcePoolPayload) SetIpAcl(v UpdateResourcePoolPayloadGetIpAclRetType) {
setUpdateResourcePoolPayloadGetIpAclAttributeType(&o.IpAcl, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetLabels() (res UpdateResourcePoolPayloadGetLabelsRetType) {
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 *UpdateResourcePoolPayload) GetLabelsOk() (ret UpdateResourcePoolPayloadGetLabelsRetType, ok bool) {
return getUpdateResourcePoolPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) 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 *UpdateResourcePoolPayload) SetLabels(v UpdateResourcePoolPayloadGetLabelsRetType) {
setUpdateResourcePoolPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetPerformanceClass() (res UpdateResourcePoolPayloadGetPerformanceClassRetType) {
res, _ = o.GetPerformanceClassOk()
return
}
// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolPayload) GetPerformanceClassOk() (ret UpdateResourcePoolPayloadGetPerformanceClassRetType, ok bool) {
return getUpdateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field.
func (o *UpdateResourcePoolPayload) SetPerformanceClass(v UpdateResourcePoolPayloadGetPerformanceClassRetType) {
setUpdateResourcePoolPayloadGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateResourcePoolPayload) GetSizeGigabytes() (res UpdateResourcePoolPayloadGetSizeGigabytesRetType) {
res, _ = o.GetSizeGigabytesOk()
return
}
// GetSizeGigabytesOk returns a tuple with the SizeGigabytes 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 *UpdateResourcePoolPayload) GetSizeGigabytesOk() (ret UpdateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) {
return getUpdateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes)
}
// HasSizeGigabytes returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasSizeGigabytes() bool {
_, ok := o.GetSizeGigabytesOk()
return ok
}
// SetSizeGigabytes gets a reference to the given int64 and assigns it to the SizeGigabytes field.
func (o *UpdateResourcePoolPayload) SetSizeGigabytes(v UpdateResourcePoolPayloadGetSizeGigabytesRetType) {
setUpdateResourcePoolPayloadGetSizeGigabytesAttributeType(&o.SizeGigabytes, v)
}
// SetSizeGigabytesNil sets the value for SizeGigabytes to be an explicit nil
func (o *UpdateResourcePoolPayload) SetSizeGigabytesNil() {
o.SizeGigabytes = nil
}
// UnsetSizeGigabytes ensures that no value is present for SizeGigabytes, not even an explicit nil
func (o *UpdateResourcePoolPayload) UnsetSizeGigabytes() {
o.SizeGigabytes = nil
}
// GetSnapshotScheduleName returns the SnapshotScheduleName field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetSnapshotScheduleName() (res UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType) {
res, _ = o.GetSnapshotScheduleNameOk()
return
}
// GetSnapshotScheduleNameOk returns a tuple with the SnapshotScheduleName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolPayload) GetSnapshotScheduleNameOk() (ret UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType, ok bool) {
return getUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeTypeOk(o.SnapshotScheduleName)
}
// HasSnapshotScheduleName returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasSnapshotScheduleName() bool {
_, ok := o.GetSnapshotScheduleNameOk()
return ok
}
// SetSnapshotScheduleName gets a reference to the given string and assigns it to the SnapshotScheduleName field.
func (o *UpdateResourcePoolPayload) SetSnapshotScheduleName(v UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType) {
setUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType(&o.SnapshotScheduleName, v)
}
// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetSnapshotsAreVisible() (res UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) {
res, _ = o.GetSnapshotsAreVisibleOk()
return
}
// GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolPayload) GetSnapshotsAreVisibleOk() (ret UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) {
return getUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible)
}
// HasSnapshotsAreVisible returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasSnapshotsAreVisible() bool {
_, ok := o.GetSnapshotsAreVisibleOk()
return ok
}
// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field.
func (o *UpdateResourcePoolPayload) SetSnapshotsAreVisible(v UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) {
setUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v)
}
func (o UpdateResourcePoolPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getUpdateResourcePoolPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getUpdateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes); ok {
toSerialize["SizeGigabytes"] = val
}
if val, ok := getUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeTypeOk(o.SnapshotScheduleName); ok {
toSerialize["SnapshotScheduleName"] = val
}
if val, ok := getUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible); ok {
toSerialize["SnapshotsAreVisible"] = val
}
return toSerialize, nil
}
type NullableUpdateResourcePoolPayload struct {
value *UpdateResourcePoolPayload
isSet bool
}
func (v NullableUpdateResourcePoolPayload) Get() *UpdateResourcePoolPayload {
return v.value
}
func (v *NullableUpdateResourcePoolPayload) Set(val *UpdateResourcePoolPayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateResourcePoolPayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateResourcePoolPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateResourcePoolPayload(val *UpdateResourcePoolPayload) *NullableUpdateResourcePoolPayload {
return &NullableUpdateResourcePoolPayload{value: val, isSet: true}
}
func (v NullableUpdateResourcePoolPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateResourcePoolPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}