terraform-provider-stackitp.../pkg/sfsbeta/model_share_export_policy.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2026-01-29 14:10:25 +00:00

371 lines
13 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 ShareExportPolicy type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ShareExportPolicy{}
/*
types and functions for createdAt
*/
// isDateTime
type ShareExportPolicyGetCreatedAtAttributeType = *time.Time
type ShareExportPolicyGetCreatedAtArgType = time.Time
type ShareExportPolicyGetCreatedAtRetType = time.Time
func getShareExportPolicyGetCreatedAtAttributeTypeOk(arg ShareExportPolicyGetCreatedAtAttributeType) (ret ShareExportPolicyGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetCreatedAtAttributeType(arg *ShareExportPolicyGetCreatedAtAttributeType, val ShareExportPolicyGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type ShareExportPolicyGetIdAttributeType = *string
func getShareExportPolicyGetIdAttributeTypeOk(arg ShareExportPolicyGetIdAttributeType) (ret ShareExportPolicyGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetIdAttributeType(arg *ShareExportPolicyGetIdAttributeType, val ShareExportPolicyGetIdRetType) {
*arg = &val
}
type ShareExportPolicyGetIdArgType = string
type ShareExportPolicyGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type ShareExportPolicyGetLabelsAttributeType = *map[string]string
type ShareExportPolicyGetLabelsArgType = map[string]string
type ShareExportPolicyGetLabelsRetType = map[string]string
func getShareExportPolicyGetLabelsAttributeTypeOk(arg ShareExportPolicyGetLabelsAttributeType) (ret ShareExportPolicyGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetLabelsAttributeType(arg *ShareExportPolicyGetLabelsAttributeType, val ShareExportPolicyGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type ShareExportPolicyGetNameAttributeType = *string
func getShareExportPolicyGetNameAttributeTypeOk(arg ShareExportPolicyGetNameAttributeType) (ret ShareExportPolicyGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetNameAttributeType(arg *ShareExportPolicyGetNameAttributeType, val ShareExportPolicyGetNameRetType) {
*arg = &val
}
type ShareExportPolicyGetNameArgType = string
type ShareExportPolicyGetNameRetType = string
/*
types and functions for rules
*/
// isArray
type ShareExportPolicyGetRulesAttributeType = *[]ShareExportPolicyRule
type ShareExportPolicyGetRulesArgType = []ShareExportPolicyRule
type ShareExportPolicyGetRulesRetType = []ShareExportPolicyRule
func getShareExportPolicyGetRulesAttributeTypeOk(arg ShareExportPolicyGetRulesAttributeType) (ret ShareExportPolicyGetRulesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetRulesAttributeType(arg *ShareExportPolicyGetRulesAttributeType, val ShareExportPolicyGetRulesRetType) {
*arg = &val
}
/*
types and functions for sharesUsingExportPolicy
*/
// isInteger
type ShareExportPolicyGetSharesUsingExportPolicyAttributeType = *int64
type ShareExportPolicyGetSharesUsingExportPolicyArgType = int64
type ShareExportPolicyGetSharesUsingExportPolicyRetType = int64
func getShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(arg ShareExportPolicyGetSharesUsingExportPolicyAttributeType) (ret ShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetSharesUsingExportPolicyAttributeType(arg *ShareExportPolicyGetSharesUsingExportPolicyAttributeType, val ShareExportPolicyGetSharesUsingExportPolicyRetType) {
*arg = &val
}
// ShareExportPolicy Details of the Share Export Policy to use in the Share. Note that if this is not set, the Share can only be mounted in read only by clients with IPs matching the IP ACL of the Resource Pool hosting this Share
type ShareExportPolicy struct {
CreatedAt ShareExportPolicyGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// ID of the Share Export Policy
Id ShareExportPolicyGetIdAttributeType `json:"id,omitempty"`
// An optional object that represents the labels associated with the share export policy 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 ShareExportPolicyGetLabelsAttributeType `json:"labels,omitempty"`
// Name of the Share Export Policy
Name ShareExportPolicyGetNameAttributeType `json:"name,omitempty"`
// List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field \"order\" within each rule
Rules ShareExportPolicyGetRulesAttributeType `json:"rules,omitempty"`
// Number of Shares using this Share Export Policy
// Can be cast to int32 without loss of precision.
SharesUsingExportPolicy ShareExportPolicyGetSharesUsingExportPolicyAttributeType `json:"sharesUsingExportPolicy,omitempty"`
}
// NewShareExportPolicy instantiates a new ShareExportPolicy 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 NewShareExportPolicy() *ShareExportPolicy {
this := ShareExportPolicy{}
return &this
}
// NewShareExportPolicyWithDefaults instantiates a new ShareExportPolicy 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 NewShareExportPolicyWithDefaults() *ShareExportPolicy {
this := ShareExportPolicy{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetCreatedAt() (res ShareExportPolicyGetCreatedAtRetType) {
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 *ShareExportPolicy) GetCreatedAtOk() (ret ShareExportPolicyGetCreatedAtRetType, ok bool) {
return getShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *ShareExportPolicy) 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 *ShareExportPolicy) SetCreatedAt(v ShareExportPolicyGetCreatedAtRetType) {
setShareExportPolicyGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetId() (res ShareExportPolicyGetIdRetType) {
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 *ShareExportPolicy) GetIdOk() (ret ShareExportPolicyGetIdRetType, ok bool) {
return getShareExportPolicyGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *ShareExportPolicy) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ShareExportPolicy) SetId(v ShareExportPolicyGetIdRetType) {
setShareExportPolicyGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetLabels() (res ShareExportPolicyGetLabelsRetType) {
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 *ShareExportPolicy) GetLabelsOk() (ret ShareExportPolicyGetLabelsRetType, ok bool) {
return getShareExportPolicyGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *ShareExportPolicy) 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 *ShareExportPolicy) SetLabels(v ShareExportPolicyGetLabelsRetType) {
setShareExportPolicyGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetName() (res ShareExportPolicyGetNameRetType) {
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 *ShareExportPolicy) GetNameOk() (ret ShareExportPolicyGetNameRetType, ok bool) {
return getShareExportPolicyGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *ShareExportPolicy) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *ShareExportPolicy) SetName(v ShareExportPolicyGetNameRetType) {
setShareExportPolicyGetNameAttributeType(&o.Name, v)
}
// GetRules returns the Rules field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetRules() (res ShareExportPolicyGetRulesRetType) {
res, _ = o.GetRulesOk()
return
}
// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ShareExportPolicy) GetRulesOk() (ret ShareExportPolicyGetRulesRetType, ok bool) {
return getShareExportPolicyGetRulesAttributeTypeOk(o.Rules)
}
// HasRules returns a boolean if a field has been set.
func (o *ShareExportPolicy) HasRules() bool {
_, ok := o.GetRulesOk()
return ok
}
// SetRules gets a reference to the given []ShareExportPolicyRule and assigns it to the Rules field.
func (o *ShareExportPolicy) SetRules(v ShareExportPolicyGetRulesRetType) {
setShareExportPolicyGetRulesAttributeType(&o.Rules, v)
}
// GetSharesUsingExportPolicy returns the SharesUsingExportPolicy field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetSharesUsingExportPolicy() (res ShareExportPolicyGetSharesUsingExportPolicyRetType) {
res, _ = o.GetSharesUsingExportPolicyOk()
return
}
// GetSharesUsingExportPolicyOk returns a tuple with the SharesUsingExportPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ShareExportPolicy) GetSharesUsingExportPolicyOk() (ret ShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) {
return getShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy)
}
// HasSharesUsingExportPolicy returns a boolean if a field has been set.
func (o *ShareExportPolicy) HasSharesUsingExportPolicy() bool {
_, ok := o.GetSharesUsingExportPolicyOk()
return ok
}
// SetSharesUsingExportPolicy gets a reference to the given int64 and assigns it to the SharesUsingExportPolicy field.
func (o *ShareExportPolicy) SetSharesUsingExportPolicy(v ShareExportPolicyGetSharesUsingExportPolicyRetType) {
setShareExportPolicyGetSharesUsingExportPolicyAttributeType(&o.SharesUsingExportPolicy, v)
}
func (o ShareExportPolicy) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getShareExportPolicyGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getShareExportPolicyGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getShareExportPolicyGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getShareExportPolicyGetRulesAttributeTypeOk(o.Rules); ok {
toSerialize["Rules"] = val
}
if val, ok := getShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy); ok {
toSerialize["SharesUsingExportPolicy"] = val
}
return toSerialize, nil
}
type NullableShareExportPolicy struct {
value *ShareExportPolicy
isSet bool
}
func (v NullableShareExportPolicy) Get() *ShareExportPolicy {
return v.value
}
func (v *NullableShareExportPolicy) Set(val *ShareExportPolicy) {
v.value = val
v.isSet = true
}
func (v NullableShareExportPolicy) IsSet() bool {
return v.isSet
}
func (v *NullableShareExportPolicy) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableShareExportPolicy(val *ShareExportPolicy) *NullableShareExportPolicy {
return &NullableShareExportPolicy{value: val, isSet: true}
}
func (v NullableShareExportPolicy) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableShareExportPolicy) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}