1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_c2_result.go 5.43 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 C2Result type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &C2Result{}
// C2Result Represents the result of an action related to C2 of a UAS.
type C2Result struct {
C2OpConfirmed bool `json:"c2OpConfirmed"`
// A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
SuppFeat *string `json:"suppFeat,omitempty"`
}
type _C2Result C2Result
// NewC2Result instantiates a new C2Result 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 NewC2Result(c2OpConfirmed bool) *C2Result {
this := C2Result{}
this.C2OpConfirmed = c2OpConfirmed
return &this
}
// NewC2ResultWithDefaults instantiates a new C2Result 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 NewC2ResultWithDefaults() *C2Result {
this := C2Result{}
return &this
}
// GetC2OpConfirmed returns the C2OpConfirmed field value
func (o *C2Result) GetC2OpConfirmed() bool {
if o == nil {
var ret bool
return ret
}
return o.C2OpConfirmed
}
// GetC2OpConfirmedOk returns a tuple with the C2OpConfirmed field value
// and a boolean to check if the value has been set.
func (o *C2Result) GetC2OpConfirmedOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.C2OpConfirmed, true
}
// SetC2OpConfirmed sets field value
func (o *C2Result) SetC2OpConfirmed(v bool) {
o.C2OpConfirmed = v
}
// GetSuppFeat returns the SuppFeat field value if set, zero value otherwise.
func (o *C2Result) GetSuppFeat() string {
if o == nil || IsNil(o.SuppFeat) {
var ret string
return ret
}
return *o.SuppFeat
}
// GetSuppFeatOk returns a tuple with the SuppFeat field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *C2Result) GetSuppFeatOk() (*string, bool) {
if o == nil || IsNil(o.SuppFeat) {
return nil, false
}
return o.SuppFeat, true
}
// HasSuppFeat returns a boolean if a field has been set.
func (o *C2Result) HasSuppFeat() bool {
if o != nil && !IsNil(o.SuppFeat) {
return true
}
return false
}
// SetSuppFeat gets a reference to the given string and assigns it to the SuppFeat field.
func (o *C2Result) SetSuppFeat(v string) {
o.SuppFeat = &v
}
func (o C2Result) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o C2Result) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["c2OpConfirmed"] = o.C2OpConfirmed
if !IsNil(o.SuppFeat) {
toSerialize["suppFeat"] = o.SuppFeat
}
return toSerialize, nil
}
func (o *C2Result) 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{
"c2OpConfirmed",
}
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)
}
}
varC2Result := _C2Result{}
err = json.Unmarshal(bytes, &varC2Result)
if err != nil {
return err
}
*o = C2Result(varC2Result)
return err
}
type NullableC2Result struct {
value *C2Result
isSet bool
}
func (v NullableC2Result) Get() *C2Result {
return v.value
}
func (v *NullableC2Result) Set(val *C2Result) {
v.value = val
v.isSet = true
}
func (v NullableC2Result) IsSet() bool {
return v.isSet
}
func (v *NullableC2Result) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableC2Result(val *C2Result) *NullableC2Result {
return &NullableC2Result{value: val, isSet: true}
}
func (v NullableC2Result) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableC2Result) 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

搜索帮助