1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_sec_param_exch_rsp_data.go 10.17 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 SecParamExchRspData type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SecParamExchRspData{}
// SecParamExchRspData Response data structure for parameter exchange
type SecParamExchRspData struct {
N32fContextId string `json:"n32fContextId"`
SelectedJweCipherSuite *string `json:"selectedJweCipherSuite,omitempty"`
SelectedJwsCipherSuite *string `json:"selectedJwsCipherSuite,omitempty"`
SelProtectionPolicyInfo *ProtectionPolicy `json:"selProtectionPolicyInfo,omitempty"`
IpxProviderSecInfoList []IpxProviderSecInfo `json:"ipxProviderSecInfoList,omitempty"`
// Fully Qualified Domain Name
Sender *string `json:"sender,omitempty"`
}
type _SecParamExchRspData SecParamExchRspData
// NewSecParamExchRspData instantiates a new SecParamExchRspData 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 NewSecParamExchRspData(n32fContextId string) *SecParamExchRspData {
this := SecParamExchRspData{}
this.N32fContextId = n32fContextId
return &this
}
// NewSecParamExchRspDataWithDefaults instantiates a new SecParamExchRspData 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 NewSecParamExchRspDataWithDefaults() *SecParamExchRspData {
this := SecParamExchRspData{}
return &this
}
// GetN32fContextId returns the N32fContextId field value
func (o *SecParamExchRspData) GetN32fContextId() string {
if o == nil {
var ret string
return ret
}
return o.N32fContextId
}
// GetN32fContextIdOk returns a tuple with the N32fContextId field value
// and a boolean to check if the value has been set.
func (o *SecParamExchRspData) GetN32fContextIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.N32fContextId, true
}
// SetN32fContextId sets field value
func (o *SecParamExchRspData) SetN32fContextId(v string) {
o.N32fContextId = v
}
// GetSelectedJweCipherSuite returns the SelectedJweCipherSuite field value if set, zero value otherwise.
func (o *SecParamExchRspData) GetSelectedJweCipherSuite() string {
if o == nil || IsNil(o.SelectedJweCipherSuite) {
var ret string
return ret
}
return *o.SelectedJweCipherSuite
}
// GetSelectedJweCipherSuiteOk returns a tuple with the SelectedJweCipherSuite field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecParamExchRspData) GetSelectedJweCipherSuiteOk() (*string, bool) {
if o == nil || IsNil(o.SelectedJweCipherSuite) {
return nil, false
}
return o.SelectedJweCipherSuite, true
}
// HasSelectedJweCipherSuite returns a boolean if a field has been set.
func (o *SecParamExchRspData) HasSelectedJweCipherSuite() bool {
if o != nil && !IsNil(o.SelectedJweCipherSuite) {
return true
}
return false
}
// SetSelectedJweCipherSuite gets a reference to the given string and assigns it to the SelectedJweCipherSuite field.
func (o *SecParamExchRspData) SetSelectedJweCipherSuite(v string) {
o.SelectedJweCipherSuite = &v
}
// GetSelectedJwsCipherSuite returns the SelectedJwsCipherSuite field value if set, zero value otherwise.
func (o *SecParamExchRspData) GetSelectedJwsCipherSuite() string {
if o == nil || IsNil(o.SelectedJwsCipherSuite) {
var ret string
return ret
}
return *o.SelectedJwsCipherSuite
}
// GetSelectedJwsCipherSuiteOk returns a tuple with the SelectedJwsCipherSuite field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecParamExchRspData) GetSelectedJwsCipherSuiteOk() (*string, bool) {
if o == nil || IsNil(o.SelectedJwsCipherSuite) {
return nil, false
}
return o.SelectedJwsCipherSuite, true
}
// HasSelectedJwsCipherSuite returns a boolean if a field has been set.
func (o *SecParamExchRspData) HasSelectedJwsCipherSuite() bool {
if o != nil && !IsNil(o.SelectedJwsCipherSuite) {
return true
}
return false
}
// SetSelectedJwsCipherSuite gets a reference to the given string and assigns it to the SelectedJwsCipherSuite field.
func (o *SecParamExchRspData) SetSelectedJwsCipherSuite(v string) {
o.SelectedJwsCipherSuite = &v
}
// GetSelProtectionPolicyInfo returns the SelProtectionPolicyInfo field value if set, zero value otherwise.
func (o *SecParamExchRspData) GetSelProtectionPolicyInfo() ProtectionPolicy {
if o == nil || IsNil(o.SelProtectionPolicyInfo) {
var ret ProtectionPolicy
return ret
}
return *o.SelProtectionPolicyInfo
}
// GetSelProtectionPolicyInfoOk returns a tuple with the SelProtectionPolicyInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecParamExchRspData) GetSelProtectionPolicyInfoOk() (*ProtectionPolicy, bool) {
if o == nil || IsNil(o.SelProtectionPolicyInfo) {
return nil, false
}
return o.SelProtectionPolicyInfo, true
}
// HasSelProtectionPolicyInfo returns a boolean if a field has been set.
func (o *SecParamExchRspData) HasSelProtectionPolicyInfo() bool {
if o != nil && !IsNil(o.SelProtectionPolicyInfo) {
return true
}
return false
}
// SetSelProtectionPolicyInfo gets a reference to the given ProtectionPolicy and assigns it to the SelProtectionPolicyInfo field.
func (o *SecParamExchRspData) SetSelProtectionPolicyInfo(v ProtectionPolicy) {
o.SelProtectionPolicyInfo = &v
}
// GetIpxProviderSecInfoList returns the IpxProviderSecInfoList field value if set, zero value otherwise.
func (o *SecParamExchRspData) GetIpxProviderSecInfoList() []IpxProviderSecInfo {
if o == nil || IsNil(o.IpxProviderSecInfoList) {
var ret []IpxProviderSecInfo
return ret
}
return o.IpxProviderSecInfoList
}
// GetIpxProviderSecInfoListOk returns a tuple with the IpxProviderSecInfoList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecParamExchRspData) GetIpxProviderSecInfoListOk() ([]IpxProviderSecInfo, bool) {
if o == nil || IsNil(o.IpxProviderSecInfoList) {
return nil, false
}
return o.IpxProviderSecInfoList, true
}
// HasIpxProviderSecInfoList returns a boolean if a field has been set.
func (o *SecParamExchRspData) HasIpxProviderSecInfoList() bool {
if o != nil && !IsNil(o.IpxProviderSecInfoList) {
return true
}
return false
}
// SetIpxProviderSecInfoList gets a reference to the given []IpxProviderSecInfo and assigns it to the IpxProviderSecInfoList field.
func (o *SecParamExchRspData) SetIpxProviderSecInfoList(v []IpxProviderSecInfo) {
o.IpxProviderSecInfoList = v
}
// GetSender returns the Sender field value if set, zero value otherwise.
func (o *SecParamExchRspData) GetSender() string {
if o == nil || IsNil(o.Sender) {
var ret string
return ret
}
return *o.Sender
}
// GetSenderOk returns a tuple with the Sender field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecParamExchRspData) GetSenderOk() (*string, bool) {
if o == nil || IsNil(o.Sender) {
return nil, false
}
return o.Sender, true
}
// HasSender returns a boolean if a field has been set.
func (o *SecParamExchRspData) HasSender() bool {
if o != nil && !IsNil(o.Sender) {
return true
}
return false
}
// SetSender gets a reference to the given string and assigns it to the Sender field.
func (o *SecParamExchRspData) SetSender(v string) {
o.Sender = &v
}
func (o SecParamExchRspData) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SecParamExchRspData) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["n32fContextId"] = o.N32fContextId
if !IsNil(o.SelectedJweCipherSuite) {
toSerialize["selectedJweCipherSuite"] = o.SelectedJweCipherSuite
}
if !IsNil(o.SelectedJwsCipherSuite) {
toSerialize["selectedJwsCipherSuite"] = o.SelectedJwsCipherSuite
}
if !IsNil(o.SelProtectionPolicyInfo) {
toSerialize["selProtectionPolicyInfo"] = o.SelProtectionPolicyInfo
}
if !IsNil(o.IpxProviderSecInfoList) {
toSerialize["ipxProviderSecInfoList"] = o.IpxProviderSecInfoList
}
if !IsNil(o.Sender) {
toSerialize["sender"] = o.Sender
}
return toSerialize, nil
}
func (o *SecParamExchRspData) 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{
"n32fContextId",
}
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)
}
}
varSecParamExchRspData := _SecParamExchRspData{}
err = json.Unmarshal(bytes, &varSecParamExchRspData)
if err != nil {
return err
}
*o = SecParamExchRspData(varSecParamExchRspData)
return err
}
type NullableSecParamExchRspData struct {
value *SecParamExchRspData
isSet bool
}
func (v NullableSecParamExchRspData) Get() *SecParamExchRspData {
return v.value
}
func (v *NullableSecParamExchRspData) Set(val *SecParamExchRspData) {
v.value = val
v.isSet = true
}
func (v NullableSecParamExchRspData) IsSet() bool {
return v.isSet
}
func (v *NullableSecParamExchRspData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSecParamExchRspData(val *SecParamExchRspData) *NullableSecParamExchRspData {
return &NullableSecParamExchRspData{value: val, isSet: true}
}
func (v NullableSecParamExchRspData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSecParamExchRspData) 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

搜索帮助