Ai
1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_pei_update_info.go 4.06 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
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 PeiUpdateInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PeiUpdateInfo{}
// PeiUpdateInfo struct for PeiUpdateInfo
type PeiUpdateInfo struct {
// String representing a Permanent Equipment Identifier that may contain - an IMEI or IMEISV, as specified in clause 6.2 of 3GPP TS 23.003; a MAC address for a 5G-RG or FN-RG via wireline access, with an indication that this address cannot be trusted for regulatory purpose if this address cannot be used as an Equipment Identifier of the FN-RG, as specified in clause 4.7.7 of 3GPP TS23.316. Examples are imei-012345678901234 or imeisv-0123456789012345.
Pei string `json:"pei"`
}
type _PeiUpdateInfo PeiUpdateInfo
// NewPeiUpdateInfo instantiates a new PeiUpdateInfo 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 NewPeiUpdateInfo(pei string) *PeiUpdateInfo {
this := PeiUpdateInfo{}
this.Pei = pei
return &this
}
// NewPeiUpdateInfoWithDefaults instantiates a new PeiUpdateInfo 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 NewPeiUpdateInfoWithDefaults() *PeiUpdateInfo {
this := PeiUpdateInfo{}
return &this
}
// GetPei returns the Pei field value
func (o *PeiUpdateInfo) GetPei() string {
if o == nil {
var ret string
return ret
}
return o.Pei
}
// GetPeiOk returns a tuple with the Pei field value
// and a boolean to check if the value has been set.
func (o *PeiUpdateInfo) GetPeiOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Pei, true
}
// SetPei sets field value
func (o *PeiUpdateInfo) SetPei(v string) {
o.Pei = v
}
func (o PeiUpdateInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PeiUpdateInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["pei"] = o.Pei
return toSerialize, nil
}
func (o *PeiUpdateInfo) 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{
"pei",
}
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)
}
}
varPeiUpdateInfo := _PeiUpdateInfo{}
err = json.Unmarshal(bytes, &varPeiUpdateInfo)
if err != nil {
return err
}
*o = PeiUpdateInfo(varPeiUpdateInfo)
return err
}
type NullablePeiUpdateInfo struct {
value *PeiUpdateInfo
isSet bool
}
func (v NullablePeiUpdateInfo) Get() *PeiUpdateInfo {
return v.value
}
func (v *NullablePeiUpdateInfo) Set(val *PeiUpdateInfo) {
v.value = val
v.isSet = true
}
func (v NullablePeiUpdateInfo) IsSet() bool {
return v.isSet
}
func (v *NullablePeiUpdateInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePeiUpdateInfo(val *PeiUpdateInfo) *NullablePeiUpdateInfo {
return &NullablePeiUpdateInfo{value: val, isSet: true}
}
func (v NullablePeiUpdateInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePeiUpdateInfo) 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

搜索帮助