1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_manage_port_notification.go 7.68 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
3gpp-nidd
API for non IP data delivery. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_NIDD
import (
"encoding/json"
"fmt"
)
// checks if the ManagePortNotification type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ManagePortNotification{}
// ManagePortNotification Represents a ManagePort notification of port numbers that are reserved.
type ManagePortNotification struct {
// string formatted according to IETF RFC 3986 identifying a referenced resource.
NiddConfiguration string `json:"niddConfiguration"`
// string containing a local identifier followed by \"@\" and a domain identifier. Both the local identifier and the domain identifier shall be encoded as strings that do not contain any \"@\" characters. See Clause 4.6.2 of 3GPP TS 23.682 for more information.
ExternalId *string `json:"externalId,omitempty"`
// string formatted according to clause 3.3 of 3GPP TS 23.003 that describes an MSISDN.
Msisdn *string `json:"msisdn,omitempty"`
// Indicates the reserved RDS port configuration information.
ManagedPorts []ManagePort `json:"managedPorts,omitempty"`
}
type _ManagePortNotification ManagePortNotification
// NewManagePortNotification instantiates a new ManagePortNotification 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 NewManagePortNotification(niddConfiguration string) *ManagePortNotification {
this := ManagePortNotification{}
return &this
}
// NewManagePortNotificationWithDefaults instantiates a new ManagePortNotification 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 NewManagePortNotificationWithDefaults() *ManagePortNotification {
this := ManagePortNotification{}
return &this
}
// GetNiddConfiguration returns the NiddConfiguration field value
func (o *ManagePortNotification) GetNiddConfiguration() string {
if o == nil {
var ret string
return ret
}
return o.NiddConfiguration
}
// GetNiddConfigurationOk returns a tuple with the NiddConfiguration field value
// and a boolean to check if the value has been set.
func (o *ManagePortNotification) GetNiddConfigurationOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NiddConfiguration, true
}
// SetNiddConfiguration sets field value
func (o *ManagePortNotification) SetNiddConfiguration(v string) {
o.NiddConfiguration = v
}
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
func (o *ManagePortNotification) GetExternalId() string {
if o == nil || IsNil(o.ExternalId) {
var ret string
return ret
}
return *o.ExternalId
}
// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ManagePortNotification) GetExternalIdOk() (*string, bool) {
if o == nil || IsNil(o.ExternalId) {
return nil, false
}
return o.ExternalId, true
}
// HasExternalId returns a boolean if a field has been set.
func (o *ManagePortNotification) HasExternalId() bool {
if o != nil && !IsNil(o.ExternalId) {
return true
}
return false
}
// SetExternalId gets a reference to the given string and assigns it to the ExternalId field.
func (o *ManagePortNotification) SetExternalId(v string) {
o.ExternalId = &v
}
// GetMsisdn returns the Msisdn field value if set, zero value otherwise.
func (o *ManagePortNotification) GetMsisdn() string {
if o == nil || IsNil(o.Msisdn) {
var ret string
return ret
}
return *o.Msisdn
}
// GetMsisdnOk returns a tuple with the Msisdn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ManagePortNotification) GetMsisdnOk() (*string, bool) {
if o == nil || IsNil(o.Msisdn) {
return nil, false
}
return o.Msisdn, true
}
// HasMsisdn returns a boolean if a field has been set.
func (o *ManagePortNotification) HasMsisdn() bool {
if o != nil && !IsNil(o.Msisdn) {
return true
}
return false
}
// SetMsisdn gets a reference to the given string and assigns it to the Msisdn field.
func (o *ManagePortNotification) SetMsisdn(v string) {
o.Msisdn = &v
}
// GetManagedPorts returns the ManagedPorts field value if set, zero value otherwise.
func (o *ManagePortNotification) GetManagedPorts() []ManagePort {
if o == nil || IsNil(o.ManagedPorts) {
var ret []ManagePort
return ret
}
return o.ManagedPorts
}
// GetManagedPortsOk returns a tuple with the ManagedPorts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ManagePortNotification) GetManagedPortsOk() ([]ManagePort, bool) {
if o == nil || IsNil(o.ManagedPorts) {
return nil, false
}
return o.ManagedPorts, true
}
// HasManagedPorts returns a boolean if a field has been set.
func (o *ManagePortNotification) HasManagedPorts() bool {
if o != nil && !IsNil(o.ManagedPorts) {
return true
}
return false
}
// SetManagedPorts gets a reference to the given []ManagePort and assigns it to the ManagedPorts field.
func (o *ManagePortNotification) SetManagedPorts(v []ManagePort) {
o.ManagedPorts = v
}
func (o ManagePortNotification) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ManagePortNotification) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["niddConfiguration"] = o.NiddConfiguration
if !IsNil(o.ExternalId) {
toSerialize["externalId"] = o.ExternalId
}
if !IsNil(o.Msisdn) {
toSerialize["msisdn"] = o.Msisdn
}
if !IsNil(o.ManagedPorts) {
toSerialize["managedPorts"] = o.ManagedPorts
}
return toSerialize, nil
}
func (o *ManagePortNotification) 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{
"niddConfiguration",
}
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)
}
}
varManagePortNotification := _ManagePortNotification{}
err = json.Unmarshal(bytes, &varManagePortNotification)
if err != nil {
return err
}
*o = ManagePortNotification(varManagePortNotification)
return err
}
type NullableManagePortNotification struct {
value *ManagePortNotification
isSet bool
}
func (v NullableManagePortNotification) Get() *ManagePortNotification {
return v.value
}
func (v *NullableManagePortNotification) Set(val *ManagePortNotification) {
v.value = val
v.isSet = true
}
func (v NullableManagePortNotification) IsSet() bool {
return v.isSet
}
func (v *NullableManagePortNotification) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableManagePortNotification(val *ManagePortNotification) *NullableManagePortNotification {
return &NullableManagePortNotification{value: val, isSet: true}
}
func (v NullableManagePortNotification) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableManagePortNotification) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助