1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_ciphering_data_set.go 10.11 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
LMF Broadcast
LMF Broadcast Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nlmf_Broadcast
import (
"encoding/json"
"fmt"
"time"
)
// checks if the CipheringDataSet type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CipheringDataSet{}
// CipheringDataSet Represents a Ciphering Data Set.
type CipheringDataSet struct {
// Ciphering Data Set Identifier.
CipheringSetID int32 `json:"cipheringSetID"`
// Ciphering Key.
CipheringKey string `json:"cipheringKey"`
// First component of the initial ciphering counter.
C0 string `json:"c0"`
// string with format 'bytes' as defined in OpenAPI
LtePosSibTypes *string `json:"ltePosSibTypes,omitempty"`
// string with format 'bytes' as defined in OpenAPI
NrPosSibTypes *string `json:"nrPosSibTypes,omitempty"`
// string with format 'date-time' as defined in OpenAPI.
ValidityStartTime time.Time `json:"validityStartTime"`
// Validity Duration of the Ciphering Data Set.
ValidityDuration int32 `json:"validityDuration"`
// string with format 'bytes' as defined in OpenAPI
TaiList *string `json:"taiList,omitempty"`
}
type _CipheringDataSet CipheringDataSet
// NewCipheringDataSet instantiates a new CipheringDataSet 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 NewCipheringDataSet(cipheringSetID int32, cipheringKey string, c0 string, validityStartTime time.Time, validityDuration int32) *CipheringDataSet {
this := CipheringDataSet{}
this.CipheringSetID = cipheringSetID
this.CipheringKey = cipheringKey
this.C0 = c0
this.ValidityStartTime = validityStartTime
this.ValidityDuration = validityDuration
return &this
}
// NewCipheringDataSetWithDefaults instantiates a new CipheringDataSet 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 NewCipheringDataSetWithDefaults() *CipheringDataSet {
this := CipheringDataSet{}
return &this
}
// GetCipheringSetID returns the CipheringSetID field value
func (o *CipheringDataSet) GetCipheringSetID() int32 {
if o == nil {
var ret int32
return ret
}
return o.CipheringSetID
}
// GetCipheringSetIDOk returns a tuple with the CipheringSetID field value
// and a boolean to check if the value has been set.
func (o *CipheringDataSet) GetCipheringSetIDOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.CipheringSetID, true
}
// SetCipheringSetID sets field value
func (o *CipheringDataSet) SetCipheringSetID(v int32) {
o.CipheringSetID = v
}
// GetCipheringKey returns the CipheringKey field value
func (o *CipheringDataSet) GetCipheringKey() string {
if o == nil {
var ret string
return ret
}
return o.CipheringKey
}
// GetCipheringKeyOk returns a tuple with the CipheringKey field value
// and a boolean to check if the value has been set.
func (o *CipheringDataSet) GetCipheringKeyOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CipheringKey, true
}
// SetCipheringKey sets field value
func (o *CipheringDataSet) SetCipheringKey(v string) {
o.CipheringKey = v
}
// GetC0 returns the C0 field value
func (o *CipheringDataSet) GetC0() string {
if o == nil {
var ret string
return ret
}
return o.C0
}
// GetC0Ok returns a tuple with the C0 field value
// and a boolean to check if the value has been set.
func (o *CipheringDataSet) GetC0Ok() (*string, bool) {
if o == nil {
return nil, false
}
return &o.C0, true
}
// SetC0 sets field value
func (o *CipheringDataSet) SetC0(v string) {
o.C0 = v
}
// GetLtePosSibTypes returns the LtePosSibTypes field value if set, zero value otherwise.
func (o *CipheringDataSet) GetLtePosSibTypes() string {
if o == nil || IsNil(o.LtePosSibTypes) {
var ret string
return ret
}
return *o.LtePosSibTypes
}
// GetLtePosSibTypesOk returns a tuple with the LtePosSibTypes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CipheringDataSet) GetLtePosSibTypesOk() (*string, bool) {
if o == nil || IsNil(o.LtePosSibTypes) {
return nil, false
}
return o.LtePosSibTypes, true
}
// HasLtePosSibTypes returns a boolean if a field has been set.
func (o *CipheringDataSet) HasLtePosSibTypes() bool {
if o != nil && !IsNil(o.LtePosSibTypes) {
return true
}
return false
}
// SetLtePosSibTypes gets a reference to the given string and assigns it to the LtePosSibTypes field.
func (o *CipheringDataSet) SetLtePosSibTypes(v string) {
o.LtePosSibTypes = &v
}
// GetNrPosSibTypes returns the NrPosSibTypes field value if set, zero value otherwise.
func (o *CipheringDataSet) GetNrPosSibTypes() string {
if o == nil || IsNil(o.NrPosSibTypes) {
var ret string
return ret
}
return *o.NrPosSibTypes
}
// GetNrPosSibTypesOk returns a tuple with the NrPosSibTypes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CipheringDataSet) GetNrPosSibTypesOk() (*string, bool) {
if o == nil || IsNil(o.NrPosSibTypes) {
return nil, false
}
return o.NrPosSibTypes, true
}
// HasNrPosSibTypes returns a boolean if a field has been set.
func (o *CipheringDataSet) HasNrPosSibTypes() bool {
if o != nil && !IsNil(o.NrPosSibTypes) {
return true
}
return false
}
// SetNrPosSibTypes gets a reference to the given string and assigns it to the NrPosSibTypes field.
func (o *CipheringDataSet) SetNrPosSibTypes(v string) {
o.NrPosSibTypes = &v
}
// GetValidityStartTime returns the ValidityStartTime field value
func (o *CipheringDataSet) GetValidityStartTime() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.ValidityStartTime
}
// GetValidityStartTimeOk returns a tuple with the ValidityStartTime field value
// and a boolean to check if the value has been set.
func (o *CipheringDataSet) GetValidityStartTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.ValidityStartTime, true
}
// SetValidityStartTime sets field value
func (o *CipheringDataSet) SetValidityStartTime(v time.Time) {
o.ValidityStartTime = v
}
// GetValidityDuration returns the ValidityDuration field value
func (o *CipheringDataSet) GetValidityDuration() int32 {
if o == nil {
var ret int32
return ret
}
return o.ValidityDuration
}
// GetValidityDurationOk returns a tuple with the ValidityDuration field value
// and a boolean to check if the value has been set.
func (o *CipheringDataSet) GetValidityDurationOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.ValidityDuration, true
}
// SetValidityDuration sets field value
func (o *CipheringDataSet) SetValidityDuration(v int32) {
o.ValidityDuration = v
}
// GetTaiList returns the TaiList field value if set, zero value otherwise.
func (o *CipheringDataSet) GetTaiList() string {
if o == nil || IsNil(o.TaiList) {
var ret string
return ret
}
return *o.TaiList
}
// GetTaiListOk returns a tuple with the TaiList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CipheringDataSet) GetTaiListOk() (*string, bool) {
if o == nil || IsNil(o.TaiList) {
return nil, false
}
return o.TaiList, true
}
// HasTaiList returns a boolean if a field has been set.
func (o *CipheringDataSet) HasTaiList() bool {
if o != nil && !IsNil(o.TaiList) {
return true
}
return false
}
// SetTaiList gets a reference to the given string and assigns it to the TaiList field.
func (o *CipheringDataSet) SetTaiList(v string) {
o.TaiList = &v
}
func (o CipheringDataSet) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CipheringDataSet) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["cipheringSetID"] = o.CipheringSetID
toSerialize["cipheringKey"] = o.CipheringKey
toSerialize["c0"] = o.C0
if !IsNil(o.LtePosSibTypes) {
toSerialize["ltePosSibTypes"] = o.LtePosSibTypes
}
if !IsNil(o.NrPosSibTypes) {
toSerialize["nrPosSibTypes"] = o.NrPosSibTypes
}
toSerialize["validityStartTime"] = o.ValidityStartTime
toSerialize["validityDuration"] = o.ValidityDuration
if !IsNil(o.TaiList) {
toSerialize["taiList"] = o.TaiList
}
return toSerialize, nil
}
func (o *CipheringDataSet) 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{
"cipheringSetID",
"cipheringKey",
"c0",
"validityStartTime",
"validityDuration",
}
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)
}
}
varCipheringDataSet := _CipheringDataSet{}
err = json.Unmarshal(bytes, &varCipheringDataSet)
if err != nil {
return err
}
*o = CipheringDataSet(varCipheringDataSet)
return err
}
type NullableCipheringDataSet struct {
value *CipheringDataSet
isSet bool
}
func (v NullableCipheringDataSet) Get() *CipheringDataSet {
return v.value
}
func (v *NullableCipheringDataSet) Set(val *CipheringDataSet) {
v.value = val
v.isSet = true
}
func (v NullableCipheringDataSet) IsSet() bool {
return v.isSet
}
func (v *NullableCipheringDataSet) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCipheringDataSet(val *CipheringDataSet) *NullableCipheringDataSet {
return &NullableCipheringDataSet{value: val, isSet: true}
}
func (v NullableCipheringDataSet) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCipheringDataSet) 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

搜索帮助