代码拉取完成,页面将自动刷新
/*
Provisioning MnS
OAS 3.0.1 definition of the Provisioning MnS © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 17.6.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_ProvMnS
import (
"encoding/json"
"fmt"
)
// checks if the EPN27Single type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EPN27Single{}
// EPN27Single struct for EPN27Single
type EPN27Single struct {
Top
Attributes *EPN27SingleAllOfAttributes `json:"attributes,omitempty"`
}
type _EPN27Single EPN27Single
// NewEPN27Single instantiates a new EPN27Single 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 NewEPN27Single(id NullableString) *EPN27Single {
this := EPN27Single{}
this.Id = id
return &this
}
// NewEPN27SingleWithDefaults instantiates a new EPN27Single 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 NewEPN27SingleWithDefaults() *EPN27Single {
this := EPN27Single{}
return &this
}
// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *EPN27Single) GetAttributes() EPN27SingleAllOfAttributes {
if o == nil || IsNil(o.Attributes) {
var ret EPN27SingleAllOfAttributes
return ret
}
return *o.Attributes
}
// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EPN27Single) GetAttributesOk() (*EPN27SingleAllOfAttributes, bool) {
if o == nil || IsNil(o.Attributes) {
return nil, false
}
return o.Attributes, true
}
// HasAttributes returns a boolean if a field has been set.
func (o *EPN27Single) HasAttributes() bool {
if o != nil && !IsNil(o.Attributes) {
return true
}
return false
}
// SetAttributes gets a reference to the given EPN27SingleAllOfAttributes and assigns it to the Attributes field.
func (o *EPN27Single) SetAttributes(v EPN27SingleAllOfAttributes) {
o.Attributes = &v
}
func (o EPN27Single) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EPN27Single) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
serializedTop, errTop := json.Marshal(o.Top)
if errTop != nil {
return map[string]interface{}{}, errTop
}
errTop = json.Unmarshal([]byte(serializedTop), &toSerialize)
if errTop != nil {
return map[string]interface{}{}, errTop
}
if !IsNil(o.Attributes) {
toSerialize["attributes"] = o.Attributes
}
return toSerialize, nil
}
func (o *EPN27Single) 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{
"id",
}
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)
}
}
varEPN27Single := _EPN27Single{}
err = json.Unmarshal(bytes, &varEPN27Single)
if err != nil {
return err
}
*o = EPN27Single(varEPN27Single)
return err
}
type NullableEPN27Single struct {
value *EPN27Single
isSet bool
}
func (v NullableEPN27Single) Get() *EPN27Single {
return v.value
}
func (v *NullableEPN27Single) Set(val *EPN27Single) {
v.value = val
v.isSet = true
}
func (v NullableEPN27Single) IsSet() bool {
return v.isSet
}
func (v *NullableEPN27Single) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEPN27Single(val *EPN27Single) *NullableEPN27Single {
return &NullableEPN27Single{value: val, isSet: true}
}
func (v NullableEPN27Single) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEPN27Single) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。