1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_c2_comm_mode_switch_notif.go 7.20 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 C2CommModeSwitchNotif type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &C2CommModeSwitchNotif{}
// C2CommModeSwitchNotif Represents information on the targeted C2 Communication Mode switching for a UAS (i.e. pair of UAV and UAV-C).
type C2CommModeSwitchNotif struct {
// string providing an URI formatted according to IETF RFC 3986.
UaeServerId string `json:"uaeServerId"`
UasId NullableUasId `json:"uasId"`
C2CommModeSwitchType C2CommModeSwitching `json:"c2CommModeSwitchType"`
SwitchingCause *C2SwitchingCause `json:"switchingCause,omitempty"`
}
type _C2CommModeSwitchNotif C2CommModeSwitchNotif
// NewC2CommModeSwitchNotif instantiates a new C2CommModeSwitchNotif 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 NewC2CommModeSwitchNotif(uaeServerId string, uasId NullableUasId, c2CommModeSwitchType C2CommModeSwitching) *C2CommModeSwitchNotif {
this := C2CommModeSwitchNotif{}
this.UaeServerId = uaeServerId
this.UasId = uasId
this.C2CommModeSwitchType = c2CommModeSwitchType
return &this
}
// NewC2CommModeSwitchNotifWithDefaults instantiates a new C2CommModeSwitchNotif 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 NewC2CommModeSwitchNotifWithDefaults() *C2CommModeSwitchNotif {
this := C2CommModeSwitchNotif{}
return &this
}
// GetUaeServerId returns the UaeServerId field value
func (o *C2CommModeSwitchNotif) GetUaeServerId() string {
if o == nil {
var ret string
return ret
}
return o.UaeServerId
}
// GetUaeServerIdOk returns a tuple with the UaeServerId field value
// and a boolean to check if the value has been set.
func (o *C2CommModeSwitchNotif) GetUaeServerIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.UaeServerId, true
}
// SetUaeServerId sets field value
func (o *C2CommModeSwitchNotif) SetUaeServerId(v string) {
o.UaeServerId = v
}
// GetUasId returns the UasId field value
// If the value is explicit nil, the zero value for UasId will be returned
func (o *C2CommModeSwitchNotif) 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 *C2CommModeSwitchNotif) GetUasIdOk() (*UasId, bool) {
if o == nil {
return nil, false
}
return o.UasId.Get(), o.UasId.IsSet()
}
// SetUasId sets field value
func (o *C2CommModeSwitchNotif) SetUasId(v UasId) {
o.UasId.Set(&v)
}
// GetC2CommModeSwitchType returns the C2CommModeSwitchType field value
func (o *C2CommModeSwitchNotif) GetC2CommModeSwitchType() C2CommModeSwitching {
if o == nil {
var ret C2CommModeSwitching
return ret
}
return o.C2CommModeSwitchType
}
// GetC2CommModeSwitchTypeOk returns a tuple with the C2CommModeSwitchType field value
// and a boolean to check if the value has been set.
func (o *C2CommModeSwitchNotif) GetC2CommModeSwitchTypeOk() (*C2CommModeSwitching, bool) {
if o == nil {
return nil, false
}
return &o.C2CommModeSwitchType, true
}
// SetC2CommModeSwitchType sets field value
func (o *C2CommModeSwitchNotif) SetC2CommModeSwitchType(v C2CommModeSwitching) {
o.C2CommModeSwitchType = v
}
// GetSwitchingCause returns the SwitchingCause field value if set, zero value otherwise.
func (o *C2CommModeSwitchNotif) GetSwitchingCause() C2SwitchingCause {
if o == nil || IsNil(o.SwitchingCause) {
var ret C2SwitchingCause
return ret
}
return *o.SwitchingCause
}
// GetSwitchingCauseOk returns a tuple with the SwitchingCause field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *C2CommModeSwitchNotif) GetSwitchingCauseOk() (*C2SwitchingCause, bool) {
if o == nil || IsNil(o.SwitchingCause) {
return nil, false
}
return o.SwitchingCause, true
}
// HasSwitchingCause returns a boolean if a field has been set.
func (o *C2CommModeSwitchNotif) HasSwitchingCause() bool {
if o != nil && !IsNil(o.SwitchingCause) {
return true
}
return false
}
// SetSwitchingCause gets a reference to the given C2SwitchingCause and assigns it to the SwitchingCause field.
func (o *C2CommModeSwitchNotif) SetSwitchingCause(v C2SwitchingCause) {
o.SwitchingCause = &v
}
func (o C2CommModeSwitchNotif) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o C2CommModeSwitchNotif) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["uaeServerId"] = o.UaeServerId
toSerialize["uasId"] = o.UasId.Get()
toSerialize["c2CommModeSwitchType"] = o.C2CommModeSwitchType
if !IsNil(o.SwitchingCause) {
toSerialize["switchingCause"] = o.SwitchingCause
}
return toSerialize, nil
}
func (o *C2CommModeSwitchNotif) 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{
"uaeServerId",
"uasId",
"c2CommModeSwitchType",
}
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)
}
}
varC2CommModeSwitchNotif := _C2CommModeSwitchNotif{}
err = json.Unmarshal(bytes, &varC2CommModeSwitchNotif)
if err != nil {
return err
}
*o = C2CommModeSwitchNotif(varC2CommModeSwitchNotif)
return err
}
type NullableC2CommModeSwitchNotif struct {
value *C2CommModeSwitchNotif
isSet bool
}
func (v NullableC2CommModeSwitchNotif) Get() *C2CommModeSwitchNotif {
return v.value
}
func (v *NullableC2CommModeSwitchNotif) Set(val *C2CommModeSwitchNotif) {
v.value = val
v.isSet = true
}
func (v NullableC2CommModeSwitchNotif) IsSet() bool {
return v.isSet
}
func (v *NullableC2CommModeSwitchNotif) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableC2CommModeSwitchNotif(val *C2CommModeSwitchNotif) *NullableC2CommModeSwitchNotif {
return &NullableC2CommModeSwitchNotif{value: val, isSet: true}
}
func (v NullableC2CommModeSwitchNotif) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableC2CommModeSwitchNotif) 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

搜索帮助