1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_srvcc_data.go 4.82 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
Nhss_imsSDM
Nhss Subscriber Data Management Service for IMS. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.1.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nhss_imsSDM
import (
"encoding/json"
"fmt"
)
// checks if the SrvccData type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SrvccData{}
// SrvccData UE SRVCC capability (if available) and STN-SR (if subscribed)
type SrvccData struct {
// String representing the STN-SR as defined in clause 18.6 of 3GPP TS 23.003.
StnSr string `json:"stnSr"`
UeSrvccCapabilities []SrvccCapability `json:"ueSrvccCapabilities,omitempty"`
}
type _SrvccData SrvccData
// NewSrvccData instantiates a new SrvccData 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 NewSrvccData(stnSr string) *SrvccData {
this := SrvccData{}
this.StnSr = stnSr
return &this
}
// NewSrvccDataWithDefaults instantiates a new SrvccData 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 NewSrvccDataWithDefaults() *SrvccData {
this := SrvccData{}
return &this
}
// GetStnSr returns the StnSr field value
func (o *SrvccData) GetStnSr() string {
if o == nil {
var ret string
return ret
}
return o.StnSr
}
// GetStnSrOk returns a tuple with the StnSr field value
// and a boolean to check if the value has been set.
func (o *SrvccData) GetStnSrOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.StnSr, true
}
// SetStnSr sets field value
func (o *SrvccData) SetStnSr(v string) {
o.StnSr = v
}
// GetUeSrvccCapabilities returns the UeSrvccCapabilities field value if set, zero value otherwise.
func (o *SrvccData) GetUeSrvccCapabilities() []SrvccCapability {
if o == nil || IsNil(o.UeSrvccCapabilities) {
var ret []SrvccCapability
return ret
}
return o.UeSrvccCapabilities
}
// GetUeSrvccCapabilitiesOk returns a tuple with the UeSrvccCapabilities field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SrvccData) GetUeSrvccCapabilitiesOk() ([]SrvccCapability, bool) {
if o == nil || IsNil(o.UeSrvccCapabilities) {
return nil, false
}
return o.UeSrvccCapabilities, true
}
// HasUeSrvccCapabilities returns a boolean if a field has been set.
func (o *SrvccData) HasUeSrvccCapabilities() bool {
if o != nil && !IsNil(o.UeSrvccCapabilities) {
return true
}
return false
}
// SetUeSrvccCapabilities gets a reference to the given []SrvccCapability and assigns it to the UeSrvccCapabilities field.
func (o *SrvccData) SetUeSrvccCapabilities(v []SrvccCapability) {
o.UeSrvccCapabilities = v
}
func (o SrvccData) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SrvccData) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["stnSr"] = o.StnSr
if !IsNil(o.UeSrvccCapabilities) {
toSerialize["ueSrvccCapabilities"] = o.UeSrvccCapabilities
}
return toSerialize, nil
}
func (o *SrvccData) 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{
"stnSr",
}
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)
}
}
varSrvccData := _SrvccData{}
err = json.Unmarshal(bytes, &varSrvccData)
if err != nil {
return err
}
*o = SrvccData(varSrvccData)
return err
}
type NullableSrvccData struct {
value *SrvccData
isSet bool
}
func (v NullableSrvccData) Get() *SrvccData {
return v.value
}
func (v *NullableSrvccData) Set(val *SrvccData) {
v.value = val
v.isSet = true
}
func (v NullableSrvccData) IsSet() bool {
return v.isSet
}
func (v *NullableSrvccData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSrvccData(val *SrvccData) *NullableSrvccData {
return &NullableSrvccData{value: val, isSet: true}
}
func (v NullableSrvccData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSrvccData) 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

搜索帮助