1 Star 0 Fork 0

MrCoder/openapi

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
model_v2x_service_info.go 5.66 KB
Copy Edit Raw Blame History
MrCoder authored 2023-12-22 15:27 +08:00 . update
/*
VAE_Service Continuity
API for VAE Service Continuity 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_VAE_ServiceContinuity
import (
"encoding/json"
"fmt"
)
// checks if the V2xServiceInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &V2xServiceInfo{}
// V2xServiceInfo Represents an individual geographical area resource including the designated V2X service identifier.
type V2xServiceInfo struct {
ServiceIds []string `json:"serviceIds"`
// 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 _V2xServiceInfo V2xServiceInfo
// NewV2xServiceInfo instantiates a new V2xServiceInfo 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 NewV2xServiceInfo(serviceIds []string) *V2xServiceInfo {
this := V2xServiceInfo{}
this.ServiceIds = serviceIds
return &this
}
// NewV2xServiceInfoWithDefaults instantiates a new V2xServiceInfo 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 NewV2xServiceInfoWithDefaults() *V2xServiceInfo {
this := V2xServiceInfo{}
return &this
}
// GetServiceIds returns the ServiceIds field value
func (o *V2xServiceInfo) GetServiceIds() []string {
if o == nil {
var ret []string
return ret
}
return o.ServiceIds
}
// GetServiceIdsOk returns a tuple with the ServiceIds field value
// and a boolean to check if the value has been set.
func (o *V2xServiceInfo) GetServiceIdsOk() ([]string, bool) {
if o == nil {
return nil, false
}
return o.ServiceIds, true
}
// SetServiceIds sets field value
func (o *V2xServiceInfo) SetServiceIds(v []string) {
o.ServiceIds = v
}
// GetSuppFeat returns the SuppFeat field value if set, zero value otherwise.
func (o *V2xServiceInfo) 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 *V2xServiceInfo) 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 *V2xServiceInfo) 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 *V2xServiceInfo) SetSuppFeat(v string) {
o.SuppFeat = &v
}
func (o V2xServiceInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o V2xServiceInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["serviceIds"] = o.ServiceIds
if !IsNil(o.SuppFeat) {
toSerialize["suppFeat"] = o.SuppFeat
}
return toSerialize, nil
}
func (o *V2xServiceInfo) 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{
"serviceIds",
}
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)
}
}
varV2xServiceInfo := _V2xServiceInfo{}
err = json.Unmarshal(bytes, &varV2xServiceInfo)
if err != nil {
return err
}
*o = V2xServiceInfo(varV2xServiceInfo)
return err
}
type NullableV2xServiceInfo struct {
value *V2xServiceInfo
isSet bool
}
func (v NullableV2xServiceInfo) Get() *V2xServiceInfo {
return v.value
}
func (v *NullableV2xServiceInfo) Set(val *V2xServiceInfo) {
v.value = val
v.isSet = true
}
func (v NullableV2xServiceInfo) IsSet() bool {
return v.isSet
}
func (v *NullableV2xServiceInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableV2xServiceInfo(val *V2xServiceInfo) *NullableV2xServiceInfo {
return &NullableV2xServiceInfo{value: val, isSet: true}
}
func (v NullableV2xServiceInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableV2xServiceInfo) 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

Search