/* 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" "time" ) // checks if the BaseSecurityGroupRule type satisfies the MappedNullable interface at compile time var _ MappedNullable = &BaseSecurityGroupRule{} /* types and functions for createdAt */ // isDateTime type BaseSecurityGroupRuleGetCreatedAtAttributeType = *time.Time type BaseSecurityGroupRuleGetCreatedAtArgType = time.Time type BaseSecurityGroupRuleGetCreatedAtRetType = time.Time func getBaseSecurityGroupRuleGetCreatedAtAttributeTypeOk(arg BaseSecurityGroupRuleGetCreatedAtAttributeType) (ret BaseSecurityGroupRuleGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetCreatedAtAttributeType(arg *BaseSecurityGroupRuleGetCreatedAtAttributeType, val BaseSecurityGroupRuleGetCreatedAtRetType) { *arg = &val } /* types and functions for description */ // isNotNullableString type BaseSecurityGroupRuleGetDescriptionAttributeType = *string func getBaseSecurityGroupRuleGetDescriptionAttributeTypeOk(arg BaseSecurityGroupRuleGetDescriptionAttributeType) (ret BaseSecurityGroupRuleGetDescriptionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetDescriptionAttributeType(arg *BaseSecurityGroupRuleGetDescriptionAttributeType, val BaseSecurityGroupRuleGetDescriptionRetType) { *arg = &val } type BaseSecurityGroupRuleGetDescriptionArgType = string type BaseSecurityGroupRuleGetDescriptionRetType = string /* types and functions for direction */ // isNotNullableString type BaseSecurityGroupRuleGetDirectionAttributeType = *string func getBaseSecurityGroupRuleGetDirectionAttributeTypeOk(arg BaseSecurityGroupRuleGetDirectionAttributeType) (ret BaseSecurityGroupRuleGetDirectionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetDirectionAttributeType(arg *BaseSecurityGroupRuleGetDirectionAttributeType, val BaseSecurityGroupRuleGetDirectionRetType) { *arg = &val } type BaseSecurityGroupRuleGetDirectionArgType = string type BaseSecurityGroupRuleGetDirectionRetType = string /* types and functions for ethertype */ // isNotNullableString type BaseSecurityGroupRuleGetEthertypeAttributeType = *string func getBaseSecurityGroupRuleGetEthertypeAttributeTypeOk(arg BaseSecurityGroupRuleGetEthertypeAttributeType) (ret BaseSecurityGroupRuleGetEthertypeRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetEthertypeAttributeType(arg *BaseSecurityGroupRuleGetEthertypeAttributeType, val BaseSecurityGroupRuleGetEthertypeRetType) { *arg = &val } type BaseSecurityGroupRuleGetEthertypeArgType = string type BaseSecurityGroupRuleGetEthertypeRetType = string /* types and functions for icmpParameters */ // isModel type BaseSecurityGroupRuleGetIcmpParametersAttributeType = *ICMPParameters type BaseSecurityGroupRuleGetIcmpParametersArgType = ICMPParameters type BaseSecurityGroupRuleGetIcmpParametersRetType = ICMPParameters func getBaseSecurityGroupRuleGetIcmpParametersAttributeTypeOk(arg BaseSecurityGroupRuleGetIcmpParametersAttributeType) (ret BaseSecurityGroupRuleGetIcmpParametersRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetIcmpParametersAttributeType(arg *BaseSecurityGroupRuleGetIcmpParametersAttributeType, val BaseSecurityGroupRuleGetIcmpParametersRetType) { *arg = &val } /* types and functions for id */ // isNotNullableString type BaseSecurityGroupRuleGetIdAttributeType = *string func getBaseSecurityGroupRuleGetIdAttributeTypeOk(arg BaseSecurityGroupRuleGetIdAttributeType) (ret BaseSecurityGroupRuleGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetIdAttributeType(arg *BaseSecurityGroupRuleGetIdAttributeType, val BaseSecurityGroupRuleGetIdRetType) { *arg = &val } type BaseSecurityGroupRuleGetIdArgType = string type BaseSecurityGroupRuleGetIdRetType = string /* types and functions for ipRange */ // isNotNullableString type BaseSecurityGroupRuleGetIpRangeAttributeType = *string func getBaseSecurityGroupRuleGetIpRangeAttributeTypeOk(arg BaseSecurityGroupRuleGetIpRangeAttributeType) (ret BaseSecurityGroupRuleGetIpRangeRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetIpRangeAttributeType(arg *BaseSecurityGroupRuleGetIpRangeAttributeType, val BaseSecurityGroupRuleGetIpRangeRetType) { *arg = &val } type BaseSecurityGroupRuleGetIpRangeArgType = string type BaseSecurityGroupRuleGetIpRangeRetType = string /* types and functions for portRange */ // isModel type BaseSecurityGroupRuleGetPortRangeAttributeType = *PortRange type BaseSecurityGroupRuleGetPortRangeArgType = PortRange type BaseSecurityGroupRuleGetPortRangeRetType = PortRange func getBaseSecurityGroupRuleGetPortRangeAttributeTypeOk(arg BaseSecurityGroupRuleGetPortRangeAttributeType) (ret BaseSecurityGroupRuleGetPortRangeRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetPortRangeAttributeType(arg *BaseSecurityGroupRuleGetPortRangeAttributeType, val BaseSecurityGroupRuleGetPortRangeRetType) { *arg = &val } /* types and functions for remoteSecurityGroupId */ // isNotNullableString type BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType = *string func getBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(arg BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType) (ret BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType(arg *BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType, val BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType) { *arg = &val } type BaseSecurityGroupRuleGetRemoteSecurityGroupIdArgType = string type BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType = string /* types and functions for securityGroupId */ // isNotNullableString type BaseSecurityGroupRuleGetSecurityGroupIdAttributeType = *string func getBaseSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(arg BaseSecurityGroupRuleGetSecurityGroupIdAttributeType) (ret BaseSecurityGroupRuleGetSecurityGroupIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetSecurityGroupIdAttributeType(arg *BaseSecurityGroupRuleGetSecurityGroupIdAttributeType, val BaseSecurityGroupRuleGetSecurityGroupIdRetType) { *arg = &val } type BaseSecurityGroupRuleGetSecurityGroupIdArgType = string type BaseSecurityGroupRuleGetSecurityGroupIdRetType = string /* types and functions for updatedAt */ // isDateTime type BaseSecurityGroupRuleGetUpdatedAtAttributeType = *time.Time type BaseSecurityGroupRuleGetUpdatedAtArgType = time.Time type BaseSecurityGroupRuleGetUpdatedAtRetType = time.Time func getBaseSecurityGroupRuleGetUpdatedAtAttributeTypeOk(arg BaseSecurityGroupRuleGetUpdatedAtAttributeType) (ret BaseSecurityGroupRuleGetUpdatedAtRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBaseSecurityGroupRuleGetUpdatedAtAttributeType(arg *BaseSecurityGroupRuleGetUpdatedAtAttributeType, val BaseSecurityGroupRuleGetUpdatedAtRetType) { *arg = &val } // BaseSecurityGroupRule The base schema for a security group rule. type BaseSecurityGroupRule struct { // Date-time when resource was created. CreatedAt BaseSecurityGroupRuleGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description BaseSecurityGroupRuleGetDescriptionAttributeType `json:"description,omitempty"` // The direction of the traffic which the rule should match. Possible values: `ingress`, `egress`. // REQUIRED Direction BaseSecurityGroupRuleGetDirectionAttributeType `json:"direction" required:"true"` // The ethertype which the rule should match. Possible values: `IPv4`, `IPv6`. Ethertype BaseSecurityGroupRuleGetEthertypeAttributeType `json:"ethertype,omitempty"` IcmpParameters BaseSecurityGroupRuleGetIcmpParametersAttributeType `json:"icmpParameters,omitempty"` // Universally Unique Identifier (UUID). Id BaseSecurityGroupRuleGetIdAttributeType `json:"id,omitempty"` // Classless Inter-Domain Routing (CIDR). IpRange BaseSecurityGroupRuleGetIpRangeAttributeType `json:"ipRange,omitempty"` PortRange BaseSecurityGroupRuleGetPortRangeAttributeType `json:"portRange,omitempty"` // Universally Unique Identifier (UUID). RemoteSecurityGroupId BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType `json:"remoteSecurityGroupId,omitempty"` // Universally Unique Identifier (UUID). SecurityGroupId BaseSecurityGroupRuleGetSecurityGroupIdAttributeType `json:"securityGroupId,omitempty"` // Date-time when resource was last updated. UpdatedAt BaseSecurityGroupRuleGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` } type _BaseSecurityGroupRule BaseSecurityGroupRule // NewBaseSecurityGroupRule instantiates a new BaseSecurityGroupRule 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 NewBaseSecurityGroupRule(direction BaseSecurityGroupRuleGetDirectionArgType) *BaseSecurityGroupRule { this := BaseSecurityGroupRule{} setBaseSecurityGroupRuleGetDirectionAttributeType(&this.Direction, direction) return &this } // NewBaseSecurityGroupRuleWithDefaults instantiates a new BaseSecurityGroupRule 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 NewBaseSecurityGroupRuleWithDefaults() *BaseSecurityGroupRule { this := BaseSecurityGroupRule{} var ethertype string = "IPv4" this.Ethertype = ðertype return &this } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetCreatedAt() (res BaseSecurityGroupRuleGetCreatedAtRetType) { 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 *BaseSecurityGroupRule) GetCreatedAtOk() (ret BaseSecurityGroupRuleGetCreatedAtRetType, ok bool) { return getBaseSecurityGroupRuleGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) 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 *BaseSecurityGroupRule) SetCreatedAt(v BaseSecurityGroupRuleGetCreatedAtRetType) { setBaseSecurityGroupRuleGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetDescription returns the Description field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetDescription() (res BaseSecurityGroupRuleGetDescriptionRetType) { 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 *BaseSecurityGroupRule) GetDescriptionOk() (ret BaseSecurityGroupRuleGetDescriptionRetType, ok bool) { return getBaseSecurityGroupRuleGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. func (o *BaseSecurityGroupRule) SetDescription(v BaseSecurityGroupRuleGetDescriptionRetType) { setBaseSecurityGroupRuleGetDescriptionAttributeType(&o.Description, v) } // GetDirection returns the Direction field value func (o *BaseSecurityGroupRule) GetDirection() (ret BaseSecurityGroupRuleGetDirectionRetType) { ret, _ = o.GetDirectionOk() return ret } // GetDirectionOk returns a tuple with the Direction field value // and a boolean to check if the value has been set. func (o *BaseSecurityGroupRule) GetDirectionOk() (ret BaseSecurityGroupRuleGetDirectionRetType, ok bool) { return getBaseSecurityGroupRuleGetDirectionAttributeTypeOk(o.Direction) } // SetDirection sets field value func (o *BaseSecurityGroupRule) SetDirection(v BaseSecurityGroupRuleGetDirectionRetType) { setBaseSecurityGroupRuleGetDirectionAttributeType(&o.Direction, v) } // GetEthertype returns the Ethertype field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetEthertype() (res BaseSecurityGroupRuleGetEthertypeRetType) { res, _ = o.GetEthertypeOk() return } // GetEthertypeOk returns a tuple with the Ethertype field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BaseSecurityGroupRule) GetEthertypeOk() (ret BaseSecurityGroupRuleGetEthertypeRetType, ok bool) { return getBaseSecurityGroupRuleGetEthertypeAttributeTypeOk(o.Ethertype) } // HasEthertype returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) HasEthertype() bool { _, ok := o.GetEthertypeOk() return ok } // SetEthertype gets a reference to the given string and assigns it to the Ethertype field. func (o *BaseSecurityGroupRule) SetEthertype(v BaseSecurityGroupRuleGetEthertypeRetType) { setBaseSecurityGroupRuleGetEthertypeAttributeType(&o.Ethertype, v) } // GetIcmpParameters returns the IcmpParameters field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetIcmpParameters() (res BaseSecurityGroupRuleGetIcmpParametersRetType) { res, _ = o.GetIcmpParametersOk() return } // GetIcmpParametersOk returns a tuple with the IcmpParameters field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BaseSecurityGroupRule) GetIcmpParametersOk() (ret BaseSecurityGroupRuleGetIcmpParametersRetType, ok bool) { return getBaseSecurityGroupRuleGetIcmpParametersAttributeTypeOk(o.IcmpParameters) } // HasIcmpParameters returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) HasIcmpParameters() bool { _, ok := o.GetIcmpParametersOk() return ok } // SetIcmpParameters gets a reference to the given ICMPParameters and assigns it to the IcmpParameters field. func (o *BaseSecurityGroupRule) SetIcmpParameters(v BaseSecurityGroupRuleGetIcmpParametersRetType) { setBaseSecurityGroupRuleGetIcmpParametersAttributeType(&o.IcmpParameters, v) } // GetId returns the Id field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetId() (res BaseSecurityGroupRuleGetIdRetType) { 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 *BaseSecurityGroupRule) GetIdOk() (ret BaseSecurityGroupRuleGetIdRetType, ok bool) { return getBaseSecurityGroupRuleGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) HasId() bool { _, ok := o.GetIdOk() return ok } // SetId gets a reference to the given string and assigns it to the Id field. func (o *BaseSecurityGroupRule) SetId(v BaseSecurityGroupRuleGetIdRetType) { setBaseSecurityGroupRuleGetIdAttributeType(&o.Id, v) } // GetIpRange returns the IpRange field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetIpRange() (res BaseSecurityGroupRuleGetIpRangeRetType) { res, _ = o.GetIpRangeOk() return } // GetIpRangeOk returns a tuple with the IpRange field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BaseSecurityGroupRule) GetIpRangeOk() (ret BaseSecurityGroupRuleGetIpRangeRetType, ok bool) { return getBaseSecurityGroupRuleGetIpRangeAttributeTypeOk(o.IpRange) } // HasIpRange returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) HasIpRange() bool { _, ok := o.GetIpRangeOk() return ok } // SetIpRange gets a reference to the given string and assigns it to the IpRange field. func (o *BaseSecurityGroupRule) SetIpRange(v BaseSecurityGroupRuleGetIpRangeRetType) { setBaseSecurityGroupRuleGetIpRangeAttributeType(&o.IpRange, v) } // GetPortRange returns the PortRange field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetPortRange() (res BaseSecurityGroupRuleGetPortRangeRetType) { res, _ = o.GetPortRangeOk() return } // GetPortRangeOk returns a tuple with the PortRange field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BaseSecurityGroupRule) GetPortRangeOk() (ret BaseSecurityGroupRuleGetPortRangeRetType, ok bool) { return getBaseSecurityGroupRuleGetPortRangeAttributeTypeOk(o.PortRange) } // HasPortRange returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) HasPortRange() bool { _, ok := o.GetPortRangeOk() return ok } // SetPortRange gets a reference to the given PortRange and assigns it to the PortRange field. func (o *BaseSecurityGroupRule) SetPortRange(v BaseSecurityGroupRuleGetPortRangeRetType) { setBaseSecurityGroupRuleGetPortRangeAttributeType(&o.PortRange, v) } // GetRemoteSecurityGroupId returns the RemoteSecurityGroupId field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetRemoteSecurityGroupId() (res BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType) { res, _ = o.GetRemoteSecurityGroupIdOk() return } // GetRemoteSecurityGroupIdOk returns a tuple with the RemoteSecurityGroupId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BaseSecurityGroupRule) GetRemoteSecurityGroupIdOk() (ret BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType, ok bool) { return getBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId) } // HasRemoteSecurityGroupId returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) HasRemoteSecurityGroupId() bool { _, ok := o.GetRemoteSecurityGroupIdOk() return ok } // SetRemoteSecurityGroupId gets a reference to the given string and assigns it to the RemoteSecurityGroupId field. func (o *BaseSecurityGroupRule) SetRemoteSecurityGroupId(v BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType) { setBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType(&o.RemoteSecurityGroupId, v) } // GetSecurityGroupId returns the SecurityGroupId field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetSecurityGroupId() (res BaseSecurityGroupRuleGetSecurityGroupIdRetType) { res, _ = o.GetSecurityGroupIdOk() return } // GetSecurityGroupIdOk returns a tuple with the SecurityGroupId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BaseSecurityGroupRule) GetSecurityGroupIdOk() (ret BaseSecurityGroupRuleGetSecurityGroupIdRetType, ok bool) { return getBaseSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId) } // HasSecurityGroupId returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) HasSecurityGroupId() bool { _, ok := o.GetSecurityGroupIdOk() return ok } // SetSecurityGroupId gets a reference to the given string and assigns it to the SecurityGroupId field. func (o *BaseSecurityGroupRule) SetSecurityGroupId(v BaseSecurityGroupRuleGetSecurityGroupIdRetType) { setBaseSecurityGroupRuleGetSecurityGroupIdAttributeType(&o.SecurityGroupId, v) } // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *BaseSecurityGroupRule) GetUpdatedAt() (res BaseSecurityGroupRuleGetUpdatedAtRetType) { res, _ = o.GetUpdatedAtOk() return } // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BaseSecurityGroupRule) GetUpdatedAtOk() (ret BaseSecurityGroupRuleGetUpdatedAtRetType, ok bool) { return getBaseSecurityGroupRuleGetUpdatedAtAttributeTypeOk(o.UpdatedAt) } // HasUpdatedAt returns a boolean if a field has been set. func (o *BaseSecurityGroupRule) HasUpdatedAt() bool { _, ok := o.GetUpdatedAtOk() return ok } // SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. func (o *BaseSecurityGroupRule) SetUpdatedAt(v BaseSecurityGroupRuleGetUpdatedAtRetType) { setBaseSecurityGroupRuleGetUpdatedAtAttributeType(&o.UpdatedAt, v) } func (o BaseSecurityGroupRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getBaseSecurityGroupRuleGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { toSerialize["CreatedAt"] = val } if val, ok := getBaseSecurityGroupRuleGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } if val, ok := getBaseSecurityGroupRuleGetDirectionAttributeTypeOk(o.Direction); ok { toSerialize["Direction"] = val } if val, ok := getBaseSecurityGroupRuleGetEthertypeAttributeTypeOk(o.Ethertype); ok { toSerialize["Ethertype"] = val } if val, ok := getBaseSecurityGroupRuleGetIcmpParametersAttributeTypeOk(o.IcmpParameters); ok { toSerialize["IcmpParameters"] = val } if val, ok := getBaseSecurityGroupRuleGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } if val, ok := getBaseSecurityGroupRuleGetIpRangeAttributeTypeOk(o.IpRange); ok { toSerialize["IpRange"] = val } if val, ok := getBaseSecurityGroupRuleGetPortRangeAttributeTypeOk(o.PortRange); ok { toSerialize["PortRange"] = val } if val, ok := getBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId); ok { toSerialize["RemoteSecurityGroupId"] = val } if val, ok := getBaseSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId); ok { toSerialize["SecurityGroupId"] = val } if val, ok := getBaseSecurityGroupRuleGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { toSerialize["UpdatedAt"] = val } return toSerialize, nil } type NullableBaseSecurityGroupRule struct { value *BaseSecurityGroupRule isSet bool } func (v NullableBaseSecurityGroupRule) Get() *BaseSecurityGroupRule { return v.value } func (v *NullableBaseSecurityGroupRule) Set(val *BaseSecurityGroupRule) { v.value = val v.isSet = true } func (v NullableBaseSecurityGroupRule) IsSet() bool { return v.isSet } func (v *NullableBaseSecurityGroupRule) Unset() { v.value = nil v.isSet = false } func NewNullableBaseSecurityGroupRule(val *BaseSecurityGroupRule) *NullableBaseSecurityGroupRule { return &NullableBaseSecurityGroupRule{value: val, isSet: true} } func (v NullableBaseSecurityGroupRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableBaseSecurityGroupRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }