/* STACKIT IaaS API This API allows you to create and modify IaaS resources. API version: 2beta1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package iaasbeta import ( "encoding/json" ) // checks if the V2beta1UpdateSecurityGroupPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &V2beta1UpdateSecurityGroupPayload{} /* types and functions for description */ // isNotNullableString type V2beta1UpdateSecurityGroupPayloadGetDescriptionAttributeType = *string func getV2beta1UpdateSecurityGroupPayloadGetDescriptionAttributeTypeOk(arg V2beta1UpdateSecurityGroupPayloadGetDescriptionAttributeType) (ret V2beta1UpdateSecurityGroupPayloadGetDescriptionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setV2beta1UpdateSecurityGroupPayloadGetDescriptionAttributeType(arg *V2beta1UpdateSecurityGroupPayloadGetDescriptionAttributeType, val V2beta1UpdateSecurityGroupPayloadGetDescriptionRetType) { *arg = &val } type V2beta1UpdateSecurityGroupPayloadGetDescriptionArgType = string type V2beta1UpdateSecurityGroupPayloadGetDescriptionRetType = string /* types and functions for labels */ // isFreeform type V2beta1UpdateSecurityGroupPayloadGetLabelsAttributeType = *map[string]interface{} type V2beta1UpdateSecurityGroupPayloadGetLabelsArgType = map[string]interface{} type V2beta1UpdateSecurityGroupPayloadGetLabelsRetType = map[string]interface{} func getV2beta1UpdateSecurityGroupPayloadGetLabelsAttributeTypeOk(arg V2beta1UpdateSecurityGroupPayloadGetLabelsAttributeType) (ret V2beta1UpdateSecurityGroupPayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setV2beta1UpdateSecurityGroupPayloadGetLabelsAttributeType(arg *V2beta1UpdateSecurityGroupPayloadGetLabelsAttributeType, val V2beta1UpdateSecurityGroupPayloadGetLabelsRetType) { *arg = &val } /* types and functions for name */ // isNotNullableString type V2beta1UpdateSecurityGroupPayloadGetNameAttributeType = *string func getV2beta1UpdateSecurityGroupPayloadGetNameAttributeTypeOk(arg V2beta1UpdateSecurityGroupPayloadGetNameAttributeType) (ret V2beta1UpdateSecurityGroupPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setV2beta1UpdateSecurityGroupPayloadGetNameAttributeType(arg *V2beta1UpdateSecurityGroupPayloadGetNameAttributeType, val V2beta1UpdateSecurityGroupPayloadGetNameRetType) { *arg = &val } type V2beta1UpdateSecurityGroupPayloadGetNameArgType = string type V2beta1UpdateSecurityGroupPayloadGetNameRetType = string // V2beta1UpdateSecurityGroupPayload Object that represents an update request body of a security group. type V2beta1UpdateSecurityGroupPayload struct { // Description Object. Allows string up to 255 Characters. Description V2beta1UpdateSecurityGroupPayloadGetDescriptionAttributeType `json:"description,omitempty"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Labels V2beta1UpdateSecurityGroupPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name V2beta1UpdateSecurityGroupPayloadGetNameAttributeType `json:"name,omitempty"` } // NewV2beta1UpdateSecurityGroupPayload instantiates a new V2beta1UpdateSecurityGroupPayload 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 NewV2beta1UpdateSecurityGroupPayload() *V2beta1UpdateSecurityGroupPayload { this := V2beta1UpdateSecurityGroupPayload{} return &this } // NewV2beta1UpdateSecurityGroupPayloadWithDefaults instantiates a new V2beta1UpdateSecurityGroupPayload 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 NewV2beta1UpdateSecurityGroupPayloadWithDefaults() *V2beta1UpdateSecurityGroupPayload { this := V2beta1UpdateSecurityGroupPayload{} return &this } // GetDescription returns the Description field value if set, zero value otherwise. func (o *V2beta1UpdateSecurityGroupPayload) GetDescription() (res V2beta1UpdateSecurityGroupPayloadGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return } // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *V2beta1UpdateSecurityGroupPayload) GetDescriptionOk() (ret V2beta1UpdateSecurityGroupPayloadGetDescriptionRetType, ok bool) { return getV2beta1UpdateSecurityGroupPayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *V2beta1UpdateSecurityGroupPayload) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. func (o *V2beta1UpdateSecurityGroupPayload) SetDescription(v V2beta1UpdateSecurityGroupPayloadGetDescriptionRetType) { setV2beta1UpdateSecurityGroupPayloadGetDescriptionAttributeType(&o.Description, v) } // GetLabels returns the Labels field value if set, zero value otherwise. func (o *V2beta1UpdateSecurityGroupPayload) GetLabels() (res V2beta1UpdateSecurityGroupPayloadGetLabelsRetType) { 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 *V2beta1UpdateSecurityGroupPayload) GetLabelsOk() (ret V2beta1UpdateSecurityGroupPayloadGetLabelsRetType, ok bool) { return getV2beta1UpdateSecurityGroupPayloadGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. func (o *V2beta1UpdateSecurityGroupPayload) HasLabels() bool { _, ok := o.GetLabelsOk() return ok } // SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. func (o *V2beta1UpdateSecurityGroupPayload) SetLabels(v V2beta1UpdateSecurityGroupPayloadGetLabelsRetType) { setV2beta1UpdateSecurityGroupPayloadGetLabelsAttributeType(&o.Labels, v) } // GetName returns the Name field value if set, zero value otherwise. func (o *V2beta1UpdateSecurityGroupPayload) GetName() (res V2beta1UpdateSecurityGroupPayloadGetNameRetType) { 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 *V2beta1UpdateSecurityGroupPayload) GetNameOk() (ret V2beta1UpdateSecurityGroupPayloadGetNameRetType, ok bool) { return getV2beta1UpdateSecurityGroupPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *V2beta1UpdateSecurityGroupPayload) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. func (o *V2beta1UpdateSecurityGroupPayload) SetName(v V2beta1UpdateSecurityGroupPayloadGetNameRetType) { setV2beta1UpdateSecurityGroupPayloadGetNameAttributeType(&o.Name, v) } func (o V2beta1UpdateSecurityGroupPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getV2beta1UpdateSecurityGroupPayloadGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } if val, ok := getV2beta1UpdateSecurityGroupPayloadGetLabelsAttributeTypeOk(o.Labels); ok { toSerialize["Labels"] = val } if val, ok := getV2beta1UpdateSecurityGroupPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } return toSerialize, nil } type NullableV2beta1UpdateSecurityGroupPayload struct { value *V2beta1UpdateSecurityGroupPayload isSet bool } func (v NullableV2beta1UpdateSecurityGroupPayload) Get() *V2beta1UpdateSecurityGroupPayload { return v.value } func (v *NullableV2beta1UpdateSecurityGroupPayload) Set(val *V2beta1UpdateSecurityGroupPayload) { v.value = val v.isSet = true } func (v NullableV2beta1UpdateSecurityGroupPayload) IsSet() bool { return v.isSet } func (v *NullableV2beta1UpdateSecurityGroupPayload) Unset() { v.value = nil v.isSet = false } func NewNullableV2beta1UpdateSecurityGroupPayload(val *V2beta1UpdateSecurityGroupPayload) *NullableV2beta1UpdateSecurityGroupPayload { return &NullableV2beta1UpdateSecurityGroupPayload{value: val, isSet: true} } func (v NullableV2beta1UpdateSecurityGroupPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableV2beta1UpdateSecurityGroupPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }