代码拉取完成,页面将自动刷新
/*
Nudr_DataRepository API OpenAPI file
Unified Data Repository Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 2.2.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nudr_DR
import (
"encoding/json"
"fmt"
)
// checks if the MulticastAccessControl type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MulticastAccessControl{}
// MulticastAccessControl Represents multicast address access control information.
type MulticastAccessControl struct {
// String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166.
SrcIpv4Addr *string `json:"srcIpv4Addr,omitempty"`
SrcIpv6Addr *Ipv6Addr `json:"srcIpv6Addr,omitempty"`
// String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166.
MulticastV4Addr *string `json:"multicastV4Addr,omitempty"`
MulticastV6Addr *Ipv6Addr `json:"multicastV6Addr,omitempty"`
AccStatus AccessRightStatus `json:"accStatus"`
}
type _MulticastAccessControl MulticastAccessControl
// NewMulticastAccessControl instantiates a new MulticastAccessControl 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 NewMulticastAccessControl(accStatus AccessRightStatus) *MulticastAccessControl {
this := MulticastAccessControl{}
this.AccStatus = accStatus
return &this
}
// NewMulticastAccessControlWithDefaults instantiates a new MulticastAccessControl 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 NewMulticastAccessControlWithDefaults() *MulticastAccessControl {
this := MulticastAccessControl{}
return &this
}
// GetSrcIpv4Addr returns the SrcIpv4Addr field value if set, zero value otherwise.
func (o *MulticastAccessControl) GetSrcIpv4Addr() string {
if o == nil || IsNil(o.SrcIpv4Addr) {
var ret string
return ret
}
return *o.SrcIpv4Addr
}
// GetSrcIpv4AddrOk returns a tuple with the SrcIpv4Addr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MulticastAccessControl) GetSrcIpv4AddrOk() (*string, bool) {
if o == nil || IsNil(o.SrcIpv4Addr) {
return nil, false
}
return o.SrcIpv4Addr, true
}
// HasSrcIpv4Addr returns a boolean if a field has been set.
func (o *MulticastAccessControl) HasSrcIpv4Addr() bool {
if o != nil && !IsNil(o.SrcIpv4Addr) {
return true
}
return false
}
// SetSrcIpv4Addr gets a reference to the given string and assigns it to the SrcIpv4Addr field.
func (o *MulticastAccessControl) SetSrcIpv4Addr(v string) {
o.SrcIpv4Addr = &v
}
// GetSrcIpv6Addr returns the SrcIpv6Addr field value if set, zero value otherwise.
func (o *MulticastAccessControl) GetSrcIpv6Addr() Ipv6Addr {
if o == nil || IsNil(o.SrcIpv6Addr) {
var ret Ipv6Addr
return ret
}
return *o.SrcIpv6Addr
}
// GetSrcIpv6AddrOk returns a tuple with the SrcIpv6Addr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MulticastAccessControl) GetSrcIpv6AddrOk() (*Ipv6Addr, bool) {
if o == nil || IsNil(o.SrcIpv6Addr) {
return nil, false
}
return o.SrcIpv6Addr, true
}
// HasSrcIpv6Addr returns a boolean if a field has been set.
func (o *MulticastAccessControl) HasSrcIpv6Addr() bool {
if o != nil && !IsNil(o.SrcIpv6Addr) {
return true
}
return false
}
// SetSrcIpv6Addr gets a reference to the given Ipv6Addr and assigns it to the SrcIpv6Addr field.
func (o *MulticastAccessControl) SetSrcIpv6Addr(v Ipv6Addr) {
o.SrcIpv6Addr = &v
}
// GetMulticastV4Addr returns the MulticastV4Addr field value if set, zero value otherwise.
func (o *MulticastAccessControl) GetMulticastV4Addr() string {
if o == nil || IsNil(o.MulticastV4Addr) {
var ret string
return ret
}
return *o.MulticastV4Addr
}
// GetMulticastV4AddrOk returns a tuple with the MulticastV4Addr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MulticastAccessControl) GetMulticastV4AddrOk() (*string, bool) {
if o == nil || IsNil(o.MulticastV4Addr) {
return nil, false
}
return o.MulticastV4Addr, true
}
// HasMulticastV4Addr returns a boolean if a field has been set.
func (o *MulticastAccessControl) HasMulticastV4Addr() bool {
if o != nil && !IsNil(o.MulticastV4Addr) {
return true
}
return false
}
// SetMulticastV4Addr gets a reference to the given string and assigns it to the MulticastV4Addr field.
func (o *MulticastAccessControl) SetMulticastV4Addr(v string) {
o.MulticastV4Addr = &v
}
// GetMulticastV6Addr returns the MulticastV6Addr field value if set, zero value otherwise.
func (o *MulticastAccessControl) GetMulticastV6Addr() Ipv6Addr {
if o == nil || IsNil(o.MulticastV6Addr) {
var ret Ipv6Addr
return ret
}
return *o.MulticastV6Addr
}
// GetMulticastV6AddrOk returns a tuple with the MulticastV6Addr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MulticastAccessControl) GetMulticastV6AddrOk() (*Ipv6Addr, bool) {
if o == nil || IsNil(o.MulticastV6Addr) {
return nil, false
}
return o.MulticastV6Addr, true
}
// HasMulticastV6Addr returns a boolean if a field has been set.
func (o *MulticastAccessControl) HasMulticastV6Addr() bool {
if o != nil && !IsNil(o.MulticastV6Addr) {
return true
}
return false
}
// SetMulticastV6Addr gets a reference to the given Ipv6Addr and assigns it to the MulticastV6Addr field.
func (o *MulticastAccessControl) SetMulticastV6Addr(v Ipv6Addr) {
o.MulticastV6Addr = &v
}
// GetAccStatus returns the AccStatus field value
func (o *MulticastAccessControl) GetAccStatus() AccessRightStatus {
if o == nil {
var ret AccessRightStatus
return ret
}
return o.AccStatus
}
// GetAccStatusOk returns a tuple with the AccStatus field value
// and a boolean to check if the value has been set.
func (o *MulticastAccessControl) GetAccStatusOk() (*AccessRightStatus, bool) {
if o == nil {
return nil, false
}
return &o.AccStatus, true
}
// SetAccStatus sets field value
func (o *MulticastAccessControl) SetAccStatus(v AccessRightStatus) {
o.AccStatus = v
}
func (o MulticastAccessControl) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MulticastAccessControl) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.SrcIpv4Addr) {
toSerialize["srcIpv4Addr"] = o.SrcIpv4Addr
}
if !IsNil(o.SrcIpv6Addr) {
toSerialize["srcIpv6Addr"] = o.SrcIpv6Addr
}
if !IsNil(o.MulticastV4Addr) {
toSerialize["multicastV4Addr"] = o.MulticastV4Addr
}
if !IsNil(o.MulticastV6Addr) {
toSerialize["multicastV6Addr"] = o.MulticastV6Addr
}
toSerialize["accStatus"] = o.AccStatus
return toSerialize, nil
}
func (o *MulticastAccessControl) UnmarshalJSON(bytes []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"accStatus",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(bytes, &allProperties)
if err != nil {
return err
}
for _, requiredProperty := range requiredProperties {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varMulticastAccessControl := _MulticastAccessControl{}
err = json.Unmarshal(bytes, &varMulticastAccessControl)
if err != nil {
return err
}
*o = MulticastAccessControl(varMulticastAccessControl)
return err
}
type NullableMulticastAccessControl struct {
value *MulticastAccessControl
isSet bool
}
func (v NullableMulticastAccessControl) Get() *MulticastAccessControl {
return v.value
}
func (v *NullableMulticastAccessControl) Set(val *MulticastAccessControl) {
v.value = val
v.isSet = true
}
func (v NullableMulticastAccessControl) IsSet() bool {
return v.isSet
}
func (v *NullableMulticastAccessControl) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMulticastAccessControl(val *MulticastAccessControl) *NullableMulticastAccessControl {
return &NullableMulticastAccessControl{value: val, isSet: true}
}
func (v NullableMulticastAccessControl) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMulticastAccessControl) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。