1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_sec_param_exch_req_data.go 9.96 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 SecParamExchReqData type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SecParamExchReqData{}
// SecParamExchReqData Request data structure for parameter exchange
type SecParamExchReqData struct {
N32fContextId string `json:"n32fContextId"`
JweCipherSuiteList []string `json:"jweCipherSuiteList,omitempty"`
JwsCipherSuiteList []string `json:"jwsCipherSuiteList,omitempty"`
ProtectionPolicyInfo *ProtectionPolicy `json:"protectionPolicyInfo,omitempty"`
IpxProviderSecInfoList []IpxProviderSecInfo `json:"ipxProviderSecInfoList,omitempty"`
// Fully Qualified Domain Name
Sender *string `json:"sender,omitempty"`
}
type _SecParamExchReqData SecParamExchReqData
// NewSecParamExchReqData instantiates a new SecParamExchReqData 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 NewSecParamExchReqData(n32fContextId string) *SecParamExchReqData {
this := SecParamExchReqData{}
this.N32fContextId = n32fContextId
return &this
}
// NewSecParamExchReqDataWithDefaults instantiates a new SecParamExchReqData 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 NewSecParamExchReqDataWithDefaults() *SecParamExchReqData {
this := SecParamExchReqData{}
return &this
}
// GetN32fContextId returns the N32fContextId field value
func (o *SecParamExchReqData) 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 *SecParamExchReqData) GetN32fContextIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.N32fContextId, true
}
// SetN32fContextId sets field value
func (o *SecParamExchReqData) SetN32fContextId(v string) {
o.N32fContextId = v
}
// GetJweCipherSuiteList returns the JweCipherSuiteList field value if set, zero value otherwise.
func (o *SecParamExchReqData) GetJweCipherSuiteList() []string {
if o == nil || IsNil(o.JweCipherSuiteList) {
var ret []string
return ret
}
return o.JweCipherSuiteList
}
// GetJweCipherSuiteListOk returns a tuple with the JweCipherSuiteList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecParamExchReqData) GetJweCipherSuiteListOk() ([]string, bool) {
if o == nil || IsNil(o.JweCipherSuiteList) {
return nil, false
}
return o.JweCipherSuiteList, true
}
// HasJweCipherSuiteList returns a boolean if a field has been set.
func (o *SecParamExchReqData) HasJweCipherSuiteList() bool {
if o != nil && !IsNil(o.JweCipherSuiteList) {
return true
}
return false
}
// SetJweCipherSuiteList gets a reference to the given []string and assigns it to the JweCipherSuiteList field.
func (o *SecParamExchReqData) SetJweCipherSuiteList(v []string) {
o.JweCipherSuiteList = v
}
// GetJwsCipherSuiteList returns the JwsCipherSuiteList field value if set, zero value otherwise.
func (o *SecParamExchReqData) GetJwsCipherSuiteList() []string {
if o == nil || IsNil(o.JwsCipherSuiteList) {
var ret []string
return ret
}
return o.JwsCipherSuiteList
}
// GetJwsCipherSuiteListOk returns a tuple with the JwsCipherSuiteList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecParamExchReqData) GetJwsCipherSuiteListOk() ([]string, bool) {
if o == nil || IsNil(o.JwsCipherSuiteList) {
return nil, false
}
return o.JwsCipherSuiteList, true
}
// HasJwsCipherSuiteList returns a boolean if a field has been set.
func (o *SecParamExchReqData) HasJwsCipherSuiteList() bool {
if o != nil && !IsNil(o.JwsCipherSuiteList) {
return true
}
return false
}
// SetJwsCipherSuiteList gets a reference to the given []string and assigns it to the JwsCipherSuiteList field.
func (o *SecParamExchReqData) SetJwsCipherSuiteList(v []string) {
o.JwsCipherSuiteList = v
}
// GetProtectionPolicyInfo returns the ProtectionPolicyInfo field value if set, zero value otherwise.
func (o *SecParamExchReqData) GetProtectionPolicyInfo() ProtectionPolicy {
if o == nil || IsNil(o.ProtectionPolicyInfo) {
var ret ProtectionPolicy
return ret
}
return *o.ProtectionPolicyInfo
}
// GetProtectionPolicyInfoOk returns a tuple with the ProtectionPolicyInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecParamExchReqData) GetProtectionPolicyInfoOk() (*ProtectionPolicy, bool) {
if o == nil || IsNil(o.ProtectionPolicyInfo) {
return nil, false
}
return o.ProtectionPolicyInfo, true
}
// HasProtectionPolicyInfo returns a boolean if a field has been set.
func (o *SecParamExchReqData) HasProtectionPolicyInfo() bool {
if o != nil && !IsNil(o.ProtectionPolicyInfo) {
return true
}
return false
}
// SetProtectionPolicyInfo gets a reference to the given ProtectionPolicy and assigns it to the ProtectionPolicyInfo field.
func (o *SecParamExchReqData) SetProtectionPolicyInfo(v ProtectionPolicy) {
o.ProtectionPolicyInfo = &v
}
// GetIpxProviderSecInfoList returns the IpxProviderSecInfoList field value if set, zero value otherwise.
func (o *SecParamExchReqData) 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 *SecParamExchReqData) 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 *SecParamExchReqData) 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 *SecParamExchReqData) SetIpxProviderSecInfoList(v []IpxProviderSecInfo) {
o.IpxProviderSecInfoList = v
}
// GetSender returns the Sender field value if set, zero value otherwise.
func (o *SecParamExchReqData) 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 *SecParamExchReqData) 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 *SecParamExchReqData) 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 *SecParamExchReqData) SetSender(v string) {
o.Sender = &v
}
func (o SecParamExchReqData) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SecParamExchReqData) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["n32fContextId"] = o.N32fContextId
if !IsNil(o.JweCipherSuiteList) {
toSerialize["jweCipherSuiteList"] = o.JweCipherSuiteList
}
if !IsNil(o.JwsCipherSuiteList) {
toSerialize["jwsCipherSuiteList"] = o.JwsCipherSuiteList
}
if !IsNil(o.ProtectionPolicyInfo) {
toSerialize["protectionPolicyInfo"] = o.ProtectionPolicyInfo
}
if !IsNil(o.IpxProviderSecInfoList) {
toSerialize["ipxProviderSecInfoList"] = o.IpxProviderSecInfoList
}
if !IsNil(o.Sender) {
toSerialize["sender"] = o.Sender
}
return toSerialize, nil
}
func (o *SecParamExchReqData) 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)
}
}
varSecParamExchReqData := _SecParamExchReqData{}
err = json.Unmarshal(bytes, &varSecParamExchReqData)
if err != nil {
return err
}
*o = SecParamExchReqData(varSecParamExchReqData)
return err
}
type NullableSecParamExchReqData struct {
value *SecParamExchReqData
isSet bool
}
func (v NullableSecParamExchReqData) Get() *SecParamExchReqData {
return v.value
}
func (v *NullableSecParamExchReqData) Set(val *SecParamExchReqData) {
v.value = val
v.isSet = true
}
func (v NullableSecParamExchReqData) IsSet() bool {
return v.isSet
}
func (v *NullableSecParamExchReqData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSecParamExchReqData(val *SecParamExchReqData) *NullableSecParamExchReqData {
return &NullableSecParamExchReqData{value: val, isSet: true}
}
func (v NullableSecParamExchReqData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSecParamExchReqData) 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

搜索帮助