1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_sm_context_update_error.go 9.21 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
Nsmf_PDUSession
SMF PDU Session Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nsmf_PDUSession
import (
"encoding/json"
"fmt"
"time"
)
// checks if the SmContextUpdateError type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SmContextUpdateError{}
// SmContextUpdateError Error within Update SM Context Response
type SmContextUpdateError struct {
Error ExtProblemDetails `json:"error"`
N1SmMsg *RefToBinaryData `json:"n1SmMsg,omitempty"`
N2SmInfo *RefToBinaryData `json:"n2SmInfo,omitempty"`
N2SmInfoType *N2SmInfoType `json:"n2SmInfoType,omitempty"`
UpCnxState *UpCnxState `json:"upCnxState,omitempty"`
// string with format 'date-time' as defined in OpenAPI.
RecoveryTime *time.Time `json:"recoveryTime,omitempty"`
}
type _SmContextUpdateError SmContextUpdateError
// NewSmContextUpdateError instantiates a new SmContextUpdateError 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 NewSmContextUpdateError(error_ ExtProblemDetails) *SmContextUpdateError {
this := SmContextUpdateError{}
this.Error = error_
return &this
}
// NewSmContextUpdateErrorWithDefaults instantiates a new SmContextUpdateError 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 NewSmContextUpdateErrorWithDefaults() *SmContextUpdateError {
this := SmContextUpdateError{}
return &this
}
// GetError returns the Error field value
func (o *SmContextUpdateError) GetError() ExtProblemDetails {
if o == nil {
var ret ExtProblemDetails
return ret
}
return o.Error
}
// GetErrorOk returns a tuple with the Error field value
// and a boolean to check if the value has been set.
func (o *SmContextUpdateError) GetErrorOk() (*ExtProblemDetails, bool) {
if o == nil {
return nil, false
}
return &o.Error, true
}
// SetError sets field value
func (o *SmContextUpdateError) SetError(v ExtProblemDetails) {
o.Error = v
}
// GetN1SmMsg returns the N1SmMsg field value if set, zero value otherwise.
func (o *SmContextUpdateError) GetN1SmMsg() RefToBinaryData {
if o == nil || IsNil(o.N1SmMsg) {
var ret RefToBinaryData
return ret
}
return *o.N1SmMsg
}
// GetN1SmMsgOk returns a tuple with the N1SmMsg field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmContextUpdateError) GetN1SmMsgOk() (*RefToBinaryData, bool) {
if o == nil || IsNil(o.N1SmMsg) {
return nil, false
}
return o.N1SmMsg, true
}
// HasN1SmMsg returns a boolean if a field has been set.
func (o *SmContextUpdateError) HasN1SmMsg() bool {
if o != nil && !IsNil(o.N1SmMsg) {
return true
}
return false
}
// SetN1SmMsg gets a reference to the given RefToBinaryData and assigns it to the N1SmMsg field.
func (o *SmContextUpdateError) SetN1SmMsg(v RefToBinaryData) {
o.N1SmMsg = &v
}
// GetN2SmInfo returns the N2SmInfo field value if set, zero value otherwise.
func (o *SmContextUpdateError) GetN2SmInfo() RefToBinaryData {
if o == nil || IsNil(o.N2SmInfo) {
var ret RefToBinaryData
return ret
}
return *o.N2SmInfo
}
// GetN2SmInfoOk returns a tuple with the N2SmInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmContextUpdateError) GetN2SmInfoOk() (*RefToBinaryData, bool) {
if o == nil || IsNil(o.N2SmInfo) {
return nil, false
}
return o.N2SmInfo, true
}
// HasN2SmInfo returns a boolean if a field has been set.
func (o *SmContextUpdateError) HasN2SmInfo() bool {
if o != nil && !IsNil(o.N2SmInfo) {
return true
}
return false
}
// SetN2SmInfo gets a reference to the given RefToBinaryData and assigns it to the N2SmInfo field.
func (o *SmContextUpdateError) SetN2SmInfo(v RefToBinaryData) {
o.N2SmInfo = &v
}
// GetN2SmInfoType returns the N2SmInfoType field value if set, zero value otherwise.
func (o *SmContextUpdateError) GetN2SmInfoType() N2SmInfoType {
if o == nil || IsNil(o.N2SmInfoType) {
var ret N2SmInfoType
return ret
}
return *o.N2SmInfoType
}
// GetN2SmInfoTypeOk returns a tuple with the N2SmInfoType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmContextUpdateError) GetN2SmInfoTypeOk() (*N2SmInfoType, bool) {
if o == nil || IsNil(o.N2SmInfoType) {
return nil, false
}
return o.N2SmInfoType, true
}
// HasN2SmInfoType returns a boolean if a field has been set.
func (o *SmContextUpdateError) HasN2SmInfoType() bool {
if o != nil && !IsNil(o.N2SmInfoType) {
return true
}
return false
}
// SetN2SmInfoType gets a reference to the given N2SmInfoType and assigns it to the N2SmInfoType field.
func (o *SmContextUpdateError) SetN2SmInfoType(v N2SmInfoType) {
o.N2SmInfoType = &v
}
// GetUpCnxState returns the UpCnxState field value if set, zero value otherwise.
func (o *SmContextUpdateError) GetUpCnxState() UpCnxState {
if o == nil || IsNil(o.UpCnxState) {
var ret UpCnxState
return ret
}
return *o.UpCnxState
}
// GetUpCnxStateOk returns a tuple with the UpCnxState field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmContextUpdateError) GetUpCnxStateOk() (*UpCnxState, bool) {
if o == nil || IsNil(o.UpCnxState) {
return nil, false
}
return o.UpCnxState, true
}
// HasUpCnxState returns a boolean if a field has been set.
func (o *SmContextUpdateError) HasUpCnxState() bool {
if o != nil && !IsNil(o.UpCnxState) {
return true
}
return false
}
// SetUpCnxState gets a reference to the given UpCnxState and assigns it to the UpCnxState field.
func (o *SmContextUpdateError) SetUpCnxState(v UpCnxState) {
o.UpCnxState = &v
}
// GetRecoveryTime returns the RecoveryTime field value if set, zero value otherwise.
func (o *SmContextUpdateError) GetRecoveryTime() time.Time {
if o == nil || IsNil(o.RecoveryTime) {
var ret time.Time
return ret
}
return *o.RecoveryTime
}
// GetRecoveryTimeOk returns a tuple with the RecoveryTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmContextUpdateError) GetRecoveryTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.RecoveryTime) {
return nil, false
}
return o.RecoveryTime, true
}
// HasRecoveryTime returns a boolean if a field has been set.
func (o *SmContextUpdateError) HasRecoveryTime() bool {
if o != nil && !IsNil(o.RecoveryTime) {
return true
}
return false
}
// SetRecoveryTime gets a reference to the given time.Time and assigns it to the RecoveryTime field.
func (o *SmContextUpdateError) SetRecoveryTime(v time.Time) {
o.RecoveryTime = &v
}
func (o SmContextUpdateError) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SmContextUpdateError) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["error"] = o.Error
if !IsNil(o.N1SmMsg) {
toSerialize["n1SmMsg"] = o.N1SmMsg
}
if !IsNil(o.N2SmInfo) {
toSerialize["n2SmInfo"] = o.N2SmInfo
}
if !IsNil(o.N2SmInfoType) {
toSerialize["n2SmInfoType"] = o.N2SmInfoType
}
if !IsNil(o.UpCnxState) {
toSerialize["upCnxState"] = o.UpCnxState
}
if !IsNil(o.RecoveryTime) {
toSerialize["recoveryTime"] = o.RecoveryTime
}
return toSerialize, nil
}
func (o *SmContextUpdateError) 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{
"error",
}
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)
}
}
varSmContextUpdateError := _SmContextUpdateError{}
err = json.Unmarshal(bytes, &varSmContextUpdateError)
if err != nil {
return err
}
*o = SmContextUpdateError(varSmContextUpdateError)
return err
}
type NullableSmContextUpdateError struct {
value *SmContextUpdateError
isSet bool
}
func (v NullableSmContextUpdateError) Get() *SmContextUpdateError {
return v.value
}
func (v *NullableSmContextUpdateError) Set(val *SmContextUpdateError) {
v.value = val
v.isSet = true
}
func (v NullableSmContextUpdateError) IsSet() bool {
return v.isSet
}
func (v *NullableSmContextUpdateError) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSmContextUpdateError(val *SmContextUpdateError) *NullableSmContextUpdateError {
return &NullableSmContextUpdateError{value: val, isSet: true}
}
func (v NullableSmContextUpdateError) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSmContextUpdateError) 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

搜索帮助