1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_gnb_id.go 4.72 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
3gpp-data-reporting-provisioning
API for 3GPP Data Reporting and Provisioning. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_DataReportingProvisioning
import (
"encoding/json"
"fmt"
)
// checks if the GNbId type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GNbId{}
// GNbId Provides the G-NB identifier.
type GNbId struct {
// Unsigned integer representing the bit length of the gNB ID as defined in clause 9.3.1.6 of 3GPP TS 38.413 [11], within the range 22 to 32.
BitLength int32 `json:"bitLength"`
// This represents the identifier of the gNB. The value of the gNB ID shall be encoded in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The padding 0 shall be added to make multiple nibbles, the most significant character representing the padding 0 if required together with the 4 most significant bits of the gNB ID shall appear first in the string, and the character representing the 4 least significant bit of the gNB ID shall appear last in the string.
GNBValue string `json:"gNBValue"`
}
type _GNbId GNbId
// NewGNbId instantiates a new GNbId 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 NewGNbId(bitLength int32, gNBValue string) *GNbId {
this := GNbId{}
this.BitLength = bitLength
this.GNBValue = gNBValue
return &this
}
// NewGNbIdWithDefaults instantiates a new GNbId 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 NewGNbIdWithDefaults() *GNbId {
this := GNbId{}
return &this
}
// GetBitLength returns the BitLength field value
func (o *GNbId) GetBitLength() int32 {
if o == nil {
var ret int32
return ret
}
return o.BitLength
}
// GetBitLengthOk returns a tuple with the BitLength field value
// and a boolean to check if the value has been set.
func (o *GNbId) GetBitLengthOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.BitLength, true
}
// SetBitLength sets field value
func (o *GNbId) SetBitLength(v int32) {
o.BitLength = v
}
// GetGNBValue returns the GNBValue field value
func (o *GNbId) GetGNBValue() string {
if o == nil {
var ret string
return ret
}
return o.GNBValue
}
// GetGNBValueOk returns a tuple with the GNBValue field value
// and a boolean to check if the value has been set.
func (o *GNbId) GetGNBValueOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.GNBValue, true
}
// SetGNBValue sets field value
func (o *GNbId) SetGNBValue(v string) {
o.GNBValue = v
}
func (o GNbId) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GNbId) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["bitLength"] = o.BitLength
toSerialize["gNBValue"] = o.GNBValue
return toSerialize, nil
}
func (o *GNbId) 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{
"bitLength",
"gNBValue",
}
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)
}
}
varGNbId := _GNbId{}
err = json.Unmarshal(bytes, &varGNbId)
if err != nil {
return err
}
*o = GNbId(varGNbId)
return err
}
type NullableGNbId struct {
value *GNbId
isSet bool
}
func (v NullableGNbId) Get() *GNbId {
return v.value
}
func (v *NullableGNbId) Set(val *GNbId) {
v.value = val
v.isSet = true
}
func (v NullableGNbId) IsSet() bool {
return v.isSet
}
func (v *NullableGNbId) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGNbId(val *GNbId) *NullableGNbId {
return &NullableGNbId{value: val, isSet: true}
}
func (v NullableGNbId) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGNbId) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助