1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_selected_c2_comm_mode_notif.go 6.58 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
UAE Server C2 Operation Mode Management Service
UAE Server C2 Operation Mode Management Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_UAE_C2OperationModeManagement
import (
"encoding/json"
"fmt"
)
// checks if the SelectedC2CommModeNotif type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SelectedC2CommModeNotif{}
// SelectedC2CommModeNotif Represents information on the C2 Communication Mode selected by a UAS (i.e. pair of UAV and UAV-C).
type SelectedC2CommModeNotif struct {
UasId NullableUasId `json:"uasId"`
SelPrimaryC2CommMode C2CommMode `json:"selPrimaryC2CommMode"`
SelSecondaryC2CommMode *C2CommMode `json:"selSecondaryC2CommMode,omitempty"`
}
type _SelectedC2CommModeNotif SelectedC2CommModeNotif
// NewSelectedC2CommModeNotif instantiates a new SelectedC2CommModeNotif 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 NewSelectedC2CommModeNotif(uasId NullableUasId, selPrimaryC2CommMode C2CommMode) *SelectedC2CommModeNotif {
this := SelectedC2CommModeNotif{}
this.UasId = uasId
this.SelPrimaryC2CommMode = selPrimaryC2CommMode
return &this
}
// NewSelectedC2CommModeNotifWithDefaults instantiates a new SelectedC2CommModeNotif 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 NewSelectedC2CommModeNotifWithDefaults() *SelectedC2CommModeNotif {
this := SelectedC2CommModeNotif{}
return &this
}
// GetUasId returns the UasId field value
// If the value is explicit nil, the zero value for UasId will be returned
func (o *SelectedC2CommModeNotif) GetUasId() UasId {
if o == nil || o.UasId.Get() == nil {
var ret UasId
return ret
}
return *o.UasId.Get()
}
// GetUasIdOk returns a tuple with the UasId field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *SelectedC2CommModeNotif) GetUasIdOk() (*UasId, bool) {
if o == nil {
return nil, false
}
return o.UasId.Get(), o.UasId.IsSet()
}
// SetUasId sets field value
func (o *SelectedC2CommModeNotif) SetUasId(v UasId) {
o.UasId.Set(&v)
}
// GetSelPrimaryC2CommMode returns the SelPrimaryC2CommMode field value
func (o *SelectedC2CommModeNotif) GetSelPrimaryC2CommMode() C2CommMode {
if o == nil {
var ret C2CommMode
return ret
}
return o.SelPrimaryC2CommMode
}
// GetSelPrimaryC2CommModeOk returns a tuple with the SelPrimaryC2CommMode field value
// and a boolean to check if the value has been set.
func (o *SelectedC2CommModeNotif) GetSelPrimaryC2CommModeOk() (*C2CommMode, bool) {
if o == nil {
return nil, false
}
return &o.SelPrimaryC2CommMode, true
}
// SetSelPrimaryC2CommMode sets field value
func (o *SelectedC2CommModeNotif) SetSelPrimaryC2CommMode(v C2CommMode) {
o.SelPrimaryC2CommMode = v
}
// GetSelSecondaryC2CommMode returns the SelSecondaryC2CommMode field value if set, zero value otherwise.
func (o *SelectedC2CommModeNotif) GetSelSecondaryC2CommMode() C2CommMode {
if o == nil || IsNil(o.SelSecondaryC2CommMode) {
var ret C2CommMode
return ret
}
return *o.SelSecondaryC2CommMode
}
// GetSelSecondaryC2CommModeOk returns a tuple with the SelSecondaryC2CommMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelectedC2CommModeNotif) GetSelSecondaryC2CommModeOk() (*C2CommMode, bool) {
if o == nil || IsNil(o.SelSecondaryC2CommMode) {
return nil, false
}
return o.SelSecondaryC2CommMode, true
}
// HasSelSecondaryC2CommMode returns a boolean if a field has been set.
func (o *SelectedC2CommModeNotif) HasSelSecondaryC2CommMode() bool {
if o != nil && !IsNil(o.SelSecondaryC2CommMode) {
return true
}
return false
}
// SetSelSecondaryC2CommMode gets a reference to the given C2CommMode and assigns it to the SelSecondaryC2CommMode field.
func (o *SelectedC2CommModeNotif) SetSelSecondaryC2CommMode(v C2CommMode) {
o.SelSecondaryC2CommMode = &v
}
func (o SelectedC2CommModeNotif) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SelectedC2CommModeNotif) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["uasId"] = o.UasId.Get()
toSerialize["selPrimaryC2CommMode"] = o.SelPrimaryC2CommMode
if !IsNil(o.SelSecondaryC2CommMode) {
toSerialize["selSecondaryC2CommMode"] = o.SelSecondaryC2CommMode
}
return toSerialize, nil
}
func (o *SelectedC2CommModeNotif) 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{
"uasId",
"selPrimaryC2CommMode",
}
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)
}
}
varSelectedC2CommModeNotif := _SelectedC2CommModeNotif{}
err = json.Unmarshal(bytes, &varSelectedC2CommModeNotif)
if err != nil {
return err
}
*o = SelectedC2CommModeNotif(varSelectedC2CommModeNotif)
return err
}
type NullableSelectedC2CommModeNotif struct {
value *SelectedC2CommModeNotif
isSet bool
}
func (v NullableSelectedC2CommModeNotif) Get() *SelectedC2CommModeNotif {
return v.value
}
func (v *NullableSelectedC2CommModeNotif) Set(val *SelectedC2CommModeNotif) {
v.value = val
v.isSet = true
}
func (v NullableSelectedC2CommModeNotif) IsSet() bool {
return v.isSet
}
func (v *NullableSelectedC2CommModeNotif) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSelectedC2CommModeNotif(val *SelectedC2CommModeNotif) *NullableSelectedC2CommModeNotif {
return &NullableSelectedC2CommModeNotif{value: val, isSet: true}
}
func (v NullableSelectedC2CommModeNotif) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSelectedC2CommModeNotif) 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

搜索帮助