1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_n32f_error_info.go 8.12 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
N32 Handshake API
N32-c Handshake Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_N32_Handshake
import (
"encoding/json"
"fmt"
)
// checks if the N32fErrorInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &N32fErrorInfo{}
// N32fErrorInfo N32-f error information
type N32fErrorInfo struct {
N32fMessageId string `json:"n32fMessageId"`
N32fErrorType N32fErrorType `json:"n32fErrorType"`
N32fContextId *string `json:"n32fContextId,omitempty"`
FailedModificationList []FailedModificationInfo `json:"failedModificationList,omitempty"`
ErrorDetailsList []N32fErrorDetail `json:"errorDetailsList,omitempty"`
}
type _N32fErrorInfo N32fErrorInfo
// NewN32fErrorInfo instantiates a new N32fErrorInfo 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 NewN32fErrorInfo(n32fMessageId string, n32fErrorType N32fErrorType) *N32fErrorInfo {
this := N32fErrorInfo{}
this.N32fMessageId = n32fMessageId
this.N32fErrorType = n32fErrorType
return &this
}
// NewN32fErrorInfoWithDefaults instantiates a new N32fErrorInfo 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 NewN32fErrorInfoWithDefaults() *N32fErrorInfo {
this := N32fErrorInfo{}
return &this
}
// GetN32fMessageId returns the N32fMessageId field value
func (o *N32fErrorInfo) GetN32fMessageId() string {
if o == nil {
var ret string
return ret
}
return o.N32fMessageId
}
// GetN32fMessageIdOk returns a tuple with the N32fMessageId field value
// and a boolean to check if the value has been set.
func (o *N32fErrorInfo) GetN32fMessageIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.N32fMessageId, true
}
// SetN32fMessageId sets field value
func (o *N32fErrorInfo) SetN32fMessageId(v string) {
o.N32fMessageId = v
}
// GetN32fErrorType returns the N32fErrorType field value
func (o *N32fErrorInfo) GetN32fErrorType() N32fErrorType {
if o == nil {
var ret N32fErrorType
return ret
}
return o.N32fErrorType
}
// GetN32fErrorTypeOk returns a tuple with the N32fErrorType field value
// and a boolean to check if the value has been set.
func (o *N32fErrorInfo) GetN32fErrorTypeOk() (*N32fErrorType, bool) {
if o == nil {
return nil, false
}
return &o.N32fErrorType, true
}
// SetN32fErrorType sets field value
func (o *N32fErrorInfo) SetN32fErrorType(v N32fErrorType) {
o.N32fErrorType = v
}
// GetN32fContextId returns the N32fContextId field value if set, zero value otherwise.
func (o *N32fErrorInfo) GetN32fContextId() string {
if o == nil || IsNil(o.N32fContextId) {
var ret string
return ret
}
return *o.N32fContextId
}
// GetN32fContextIdOk returns a tuple with the N32fContextId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *N32fErrorInfo) GetN32fContextIdOk() (*string, bool) {
if o == nil || IsNil(o.N32fContextId) {
return nil, false
}
return o.N32fContextId, true
}
// HasN32fContextId returns a boolean if a field has been set.
func (o *N32fErrorInfo) HasN32fContextId() bool {
if o != nil && !IsNil(o.N32fContextId) {
return true
}
return false
}
// SetN32fContextId gets a reference to the given string and assigns it to the N32fContextId field.
func (o *N32fErrorInfo) SetN32fContextId(v string) {
o.N32fContextId = &v
}
// GetFailedModificationList returns the FailedModificationList field value if set, zero value otherwise.
func (o *N32fErrorInfo) GetFailedModificationList() []FailedModificationInfo {
if o == nil || IsNil(o.FailedModificationList) {
var ret []FailedModificationInfo
return ret
}
return o.FailedModificationList
}
// GetFailedModificationListOk returns a tuple with the FailedModificationList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *N32fErrorInfo) GetFailedModificationListOk() ([]FailedModificationInfo, bool) {
if o == nil || IsNil(o.FailedModificationList) {
return nil, false
}
return o.FailedModificationList, true
}
// HasFailedModificationList returns a boolean if a field has been set.
func (o *N32fErrorInfo) HasFailedModificationList() bool {
if o != nil && !IsNil(o.FailedModificationList) {
return true
}
return false
}
// SetFailedModificationList gets a reference to the given []FailedModificationInfo and assigns it to the FailedModificationList field.
func (o *N32fErrorInfo) SetFailedModificationList(v []FailedModificationInfo) {
o.FailedModificationList = v
}
// GetErrorDetailsList returns the ErrorDetailsList field value if set, zero value otherwise.
func (o *N32fErrorInfo) GetErrorDetailsList() []N32fErrorDetail {
if o == nil || IsNil(o.ErrorDetailsList) {
var ret []N32fErrorDetail
return ret
}
return o.ErrorDetailsList
}
// GetErrorDetailsListOk returns a tuple with the ErrorDetailsList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *N32fErrorInfo) GetErrorDetailsListOk() ([]N32fErrorDetail, bool) {
if o == nil || IsNil(o.ErrorDetailsList) {
return nil, false
}
return o.ErrorDetailsList, true
}
// HasErrorDetailsList returns a boolean if a field has been set.
func (o *N32fErrorInfo) HasErrorDetailsList() bool {
if o != nil && !IsNil(o.ErrorDetailsList) {
return true
}
return false
}
// SetErrorDetailsList gets a reference to the given []N32fErrorDetail and assigns it to the ErrorDetailsList field.
func (o *N32fErrorInfo) SetErrorDetailsList(v []N32fErrorDetail) {
o.ErrorDetailsList = v
}
func (o N32fErrorInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o N32fErrorInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["n32fMessageId"] = o.N32fMessageId
toSerialize["n32fErrorType"] = o.N32fErrorType
if !IsNil(o.N32fContextId) {
toSerialize["n32fContextId"] = o.N32fContextId
}
if !IsNil(o.FailedModificationList) {
toSerialize["failedModificationList"] = o.FailedModificationList
}
if !IsNil(o.ErrorDetailsList) {
toSerialize["errorDetailsList"] = o.ErrorDetailsList
}
return toSerialize, nil
}
func (o *N32fErrorInfo) 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{
"n32fMessageId",
"n32fErrorType",
}
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)
}
}
varN32fErrorInfo := _N32fErrorInfo{}
err = json.Unmarshal(bytes, &varN32fErrorInfo)
if err != nil {
return err
}
*o = N32fErrorInfo(varN32fErrorInfo)
return err
}
type NullableN32fErrorInfo struct {
value *N32fErrorInfo
isSet bool
}
func (v NullableN32fErrorInfo) Get() *N32fErrorInfo {
return v.value
}
func (v *NullableN32fErrorInfo) Set(val *N32fErrorInfo) {
v.value = val
v.isSet = true
}
func (v NullableN32fErrorInfo) IsSet() bool {
return v.isSet
}
func (v *NullableN32fErrorInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableN32fErrorInfo(val *N32fErrorInfo) *NullableN32fErrorInfo {
return &NullableN32fErrorInfo{value: val, isSet: true}
}
func (v NullableN32fErrorInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableN32fErrorInfo) 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

搜索帮助