terraform-provider-stackitp.../pkg/gitbeta/model_patch_instance_payload.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

176 lines
5.8 KiB
Go

/*
STACKIT Git API
STACKIT Git management API.
API version: 1beta.0.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package gitbeta
import (
"encoding/json"
)
// checks if the PatchInstancePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PatchInstancePayload{}
/*
types and functions for acl
*/
// isArray
type PatchInstancePayloadGetAclAttributeType = *[]string
type PatchInstancePayloadGetAclArgType = *[]string
type PatchInstancePayloadGetAclRetType = *[]string
func getPatchInstancePayloadGetAclAttributeTypeOk(arg PatchInstancePayloadGetAclAttributeType) (ret PatchInstancePayloadGetAclRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setPatchInstancePayloadGetAclAttributeType(arg *PatchInstancePayloadGetAclAttributeType, val PatchInstancePayloadGetAclRetType) {
*arg = val
}
/*
types and functions for feature_toggle
*/
// isModel
type PatchInstancePayloadGetFeatureToggleAttributeType = *FeatureToggle
type PatchInstancePayloadGetFeatureToggleArgType = FeatureToggle
type PatchInstancePayloadGetFeatureToggleRetType = FeatureToggle
func getPatchInstancePayloadGetFeatureToggleAttributeTypeOk(arg PatchInstancePayloadGetFeatureToggleAttributeType) (ret PatchInstancePayloadGetFeatureToggleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPatchInstancePayloadGetFeatureToggleAttributeType(arg *PatchInstancePayloadGetFeatureToggleAttributeType, val PatchInstancePayloadGetFeatureToggleRetType) {
*arg = &val
}
// PatchInstancePayload Properties to patch on an instance. All fields are optional.
type PatchInstancePayload struct {
// A list of CIDR network addresses that are allowed to access the instance.
Acl PatchInstancePayloadGetAclAttributeType `json:"acl,omitempty"`
FeatureToggle PatchInstancePayloadGetFeatureToggleAttributeType `json:"feature_toggle,omitempty"`
}
// NewPatchInstancePayload instantiates a new PatchInstancePayload 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 NewPatchInstancePayload() *PatchInstancePayload {
this := PatchInstancePayload{}
return &this
}
// NewPatchInstancePayloadWithDefaults instantiates a new PatchInstancePayload 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 NewPatchInstancePayloadWithDefaults() *PatchInstancePayload {
this := PatchInstancePayload{}
return &this
}
// GetAcl returns the Acl field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PatchInstancePayload) GetAcl() (res PatchInstancePayloadGetAclRetType) {
res, _ = o.GetAclOk()
return
}
// GetAclOk returns a tuple with the Acl 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 *PatchInstancePayload) GetAclOk() (ret PatchInstancePayloadGetAclRetType, ok bool) {
return getPatchInstancePayloadGetAclAttributeTypeOk(o.Acl)
}
// HasAcl returns a boolean if a field has been set.
func (o *PatchInstancePayload) HasAcl() bool {
_, ok := o.GetAclOk()
return ok
}
// SetAcl gets a reference to the given []string and assigns it to the Acl field.
func (o *PatchInstancePayload) SetAcl(v PatchInstancePayloadGetAclRetType) {
setPatchInstancePayloadGetAclAttributeType(&o.Acl, v)
}
// GetFeatureToggle returns the FeatureToggle field value if set, zero value otherwise.
func (o *PatchInstancePayload) GetFeatureToggle() (res PatchInstancePayloadGetFeatureToggleRetType) {
res, _ = o.GetFeatureToggleOk()
return
}
// GetFeatureToggleOk returns a tuple with the FeatureToggle field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PatchInstancePayload) GetFeatureToggleOk() (ret PatchInstancePayloadGetFeatureToggleRetType, ok bool) {
return getPatchInstancePayloadGetFeatureToggleAttributeTypeOk(o.FeatureToggle)
}
// HasFeatureToggle returns a boolean if a field has been set.
func (o *PatchInstancePayload) HasFeatureToggle() bool {
_, ok := o.GetFeatureToggleOk()
return ok
}
// SetFeatureToggle gets a reference to the given FeatureToggle and assigns it to the FeatureToggle field.
func (o *PatchInstancePayload) SetFeatureToggle(v PatchInstancePayloadGetFeatureToggleRetType) {
setPatchInstancePayloadGetFeatureToggleAttributeType(&o.FeatureToggle, v)
}
func (o PatchInstancePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getPatchInstancePayloadGetAclAttributeTypeOk(o.Acl); ok {
toSerialize["Acl"] = val
}
if val, ok := getPatchInstancePayloadGetFeatureToggleAttributeTypeOk(o.FeatureToggle); ok {
toSerialize["FeatureToggle"] = val
}
return toSerialize, nil
}
type NullablePatchInstancePayload struct {
value *PatchInstancePayload
isSet bool
}
func (v NullablePatchInstancePayload) Get() *PatchInstancePayload {
return v.value
}
func (v *NullablePatchInstancePayload) Set(val *PatchInstancePayload) {
v.value = val
v.isSet = true
}
func (v NullablePatchInstancePayload) IsSet() bool {
return v.isSet
}
func (v *NullablePatchInstancePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePatchInstancePayload(val *PatchInstancePayload) *NullablePatchInstancePayload {
return &NullablePatchInstancePayload{value: val, isSet: true}
}
func (v NullablePatchInstancePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePatchInstancePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}