代码拉取完成,页面将自动刷新
/*
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"
)
// MnS1 - struct for MnS1
type MnS1 struct {
MnSOneOf *MnSOneOf
}
// MnSOneOfAsMnS1 is a convenience function that returns MnSOneOf wrapped in MnS1
func MnSOneOfAsMnS1(v *MnSOneOf) MnS1 {
return MnS1{
MnSOneOf: v,
}
}
// Unmarshal JSON data into one of the pointers in the struct
func (dst *MnS1) UnmarshalJSON(data []byte) error {
var err error
match := 0
// try to unmarshal data into MnSOneOf
err = newStrictDecoder(data).Decode(&dst.MnSOneOf)
if err == nil {
jsonMnSOneOf, _ := json.Marshal(dst.MnSOneOf)
if string(jsonMnSOneOf) == "{}" { // empty struct
dst.MnSOneOf = nil
} else {
match++
}
} else {
dst.MnSOneOf = nil
}
if match > 1 { // more than 1 match
// reset to nil
dst.MnSOneOf = nil
return fmt.Errorf("data matches more than one schema in oneOf(MnS1)")
} else if match == 1 {
return nil // exactly one match
} else { // no match
return fmt.Errorf("data failed to match schemas in oneOf(MnS1)")
}
}
// Marshal data from the first non-nil pointers in the struct to JSON
func (src MnS1) MarshalJSON() ([]byte, error) {
if src.MnSOneOf != nil {
return json.Marshal(&src.MnSOneOf)
}
return nil, nil // no data in oneOf schemas
}
// Get the actual instance
func (obj *MnS1) GetActualInstance() interface{} {
if obj == nil {
return nil
}
if obj.MnSOneOf != nil {
return obj.MnSOneOf
}
// all schemas are nil
return nil
}
type NullableMnS1 struct {
value *MnS1
isSet bool
}
func (v NullableMnS1) Get() *MnS1 {
return v.value
}
func (v *NullableMnS1) Set(val *MnS1) {
v.value = val
v.isSet = true
}
func (v NullableMnS1) IsSet() bool {
return v.isSet
}
func (v *NullableMnS1) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMnS1(val *MnS1) *NullableMnS1 {
return &NullableMnS1{value: val, isSet: true}
}
func (v NullableMnS1) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMnS1) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。