/* 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) }