1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_ac_profile.go 9.64 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
Eecs_ServiceProvisioning
API for ECS Service Provisioning. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Eecs_ServiceProvisioning
import (
"encoding/json"
"fmt"
)
// checks if the ACProfile type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ACProfile{}
// ACProfile ECS service provisioning response information.
type ACProfile struct {
// Identity of the AC.
AcId string `json:"acId"`
// The category or type of AC.
AcType *string `json:"acType,omitempty"`
// Indicates to the ECS which ECSPs are preferred for the AC.
PrefEcsps []string `json:"prefEcsps,omitempty"`
AcSchedule *ScheduledCommunicationTime `json:"acSchedule,omitempty"`
ExpAcGeoServArea *LocationArea5G `json:"expAcGeoServArea,omitempty"`
// Profiles of ACs for which the EEC provides edge enabling services.
AcSvcContSupp []ACRScenario `json:"acSvcContSupp,omitempty"`
// List of EAS information.
Eass []EasDetail `json:"eass,omitempty"`
}
type _ACProfile ACProfile
// NewACProfile instantiates a new ACProfile 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 NewACProfile(acId string) *ACProfile {
this := ACProfile{}
this.AcId = acId
return &this
}
// NewACProfileWithDefaults instantiates a new ACProfile 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 NewACProfileWithDefaults() *ACProfile {
this := ACProfile{}
return &this
}
// GetAcId returns the AcId field value
func (o *ACProfile) GetAcId() string {
if o == nil {
var ret string
return ret
}
return o.AcId
}
// GetAcIdOk returns a tuple with the AcId field value
// and a boolean to check if the value has been set.
func (o *ACProfile) GetAcIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AcId, true
}
// SetAcId sets field value
func (o *ACProfile) SetAcId(v string) {
o.AcId = v
}
// GetAcType returns the AcType field value if set, zero value otherwise.
func (o *ACProfile) GetAcType() string {
if o == nil || IsNil(o.AcType) {
var ret string
return ret
}
return *o.AcType
}
// GetAcTypeOk returns a tuple with the AcType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ACProfile) GetAcTypeOk() (*string, bool) {
if o == nil || IsNil(o.AcType) {
return nil, false
}
return o.AcType, true
}
// HasAcType returns a boolean if a field has been set.
func (o *ACProfile) HasAcType() bool {
if o != nil && !IsNil(o.AcType) {
return true
}
return false
}
// SetAcType gets a reference to the given string and assigns it to the AcType field.
func (o *ACProfile) SetAcType(v string) {
o.AcType = &v
}
// GetPrefEcsps returns the PrefEcsps field value if set, zero value otherwise.
func (o *ACProfile) GetPrefEcsps() []string {
if o == nil || IsNil(o.PrefEcsps) {
var ret []string
return ret
}
return o.PrefEcsps
}
// GetPrefEcspsOk returns a tuple with the PrefEcsps field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ACProfile) GetPrefEcspsOk() ([]string, bool) {
if o == nil || IsNil(o.PrefEcsps) {
return nil, false
}
return o.PrefEcsps, true
}
// HasPrefEcsps returns a boolean if a field has been set.
func (o *ACProfile) HasPrefEcsps() bool {
if o != nil && !IsNil(o.PrefEcsps) {
return true
}
return false
}
// SetPrefEcsps gets a reference to the given []string and assigns it to the PrefEcsps field.
func (o *ACProfile) SetPrefEcsps(v []string) {
o.PrefEcsps = v
}
// GetAcSchedule returns the AcSchedule field value if set, zero value otherwise.
func (o *ACProfile) GetAcSchedule() ScheduledCommunicationTime {
if o == nil || IsNil(o.AcSchedule) {
var ret ScheduledCommunicationTime
return ret
}
return *o.AcSchedule
}
// GetAcScheduleOk returns a tuple with the AcSchedule field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ACProfile) GetAcScheduleOk() (*ScheduledCommunicationTime, bool) {
if o == nil || IsNil(o.AcSchedule) {
return nil, false
}
return o.AcSchedule, true
}
// HasAcSchedule returns a boolean if a field has been set.
func (o *ACProfile) HasAcSchedule() bool {
if o != nil && !IsNil(o.AcSchedule) {
return true
}
return false
}
// SetAcSchedule gets a reference to the given ScheduledCommunicationTime and assigns it to the AcSchedule field.
func (o *ACProfile) SetAcSchedule(v ScheduledCommunicationTime) {
o.AcSchedule = &v
}
// GetExpAcGeoServArea returns the ExpAcGeoServArea field value if set, zero value otherwise.
func (o *ACProfile) GetExpAcGeoServArea() LocationArea5G {
if o == nil || IsNil(o.ExpAcGeoServArea) {
var ret LocationArea5G
return ret
}
return *o.ExpAcGeoServArea
}
// GetExpAcGeoServAreaOk returns a tuple with the ExpAcGeoServArea field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ACProfile) GetExpAcGeoServAreaOk() (*LocationArea5G, bool) {
if o == nil || IsNil(o.ExpAcGeoServArea) {
return nil, false
}
return o.ExpAcGeoServArea, true
}
// HasExpAcGeoServArea returns a boolean if a field has been set.
func (o *ACProfile) HasExpAcGeoServArea() bool {
if o != nil && !IsNil(o.ExpAcGeoServArea) {
return true
}
return false
}
// SetExpAcGeoServArea gets a reference to the given LocationArea5G and assigns it to the ExpAcGeoServArea field.
func (o *ACProfile) SetExpAcGeoServArea(v LocationArea5G) {
o.ExpAcGeoServArea = &v
}
// GetAcSvcContSupp returns the AcSvcContSupp field value if set, zero value otherwise.
func (o *ACProfile) GetAcSvcContSupp() []ACRScenario {
if o == nil || IsNil(o.AcSvcContSupp) {
var ret []ACRScenario
return ret
}
return o.AcSvcContSupp
}
// GetAcSvcContSuppOk returns a tuple with the AcSvcContSupp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ACProfile) GetAcSvcContSuppOk() ([]ACRScenario, bool) {
if o == nil || IsNil(o.AcSvcContSupp) {
return nil, false
}
return o.AcSvcContSupp, true
}
// HasAcSvcContSupp returns a boolean if a field has been set.
func (o *ACProfile) HasAcSvcContSupp() bool {
if o != nil && !IsNil(o.AcSvcContSupp) {
return true
}
return false
}
// SetAcSvcContSupp gets a reference to the given []ACRScenario and assigns it to the AcSvcContSupp field.
func (o *ACProfile) SetAcSvcContSupp(v []ACRScenario) {
o.AcSvcContSupp = v
}
// GetEass returns the Eass field value if set, zero value otherwise.
func (o *ACProfile) GetEass() []EasDetail {
if o == nil || IsNil(o.Eass) {
var ret []EasDetail
return ret
}
return o.Eass
}
// GetEassOk returns a tuple with the Eass field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ACProfile) GetEassOk() ([]EasDetail, bool) {
if o == nil || IsNil(o.Eass) {
return nil, false
}
return o.Eass, true
}
// HasEass returns a boolean if a field has been set.
func (o *ACProfile) HasEass() bool {
if o != nil && !IsNil(o.Eass) {
return true
}
return false
}
// SetEass gets a reference to the given []EasDetail and assigns it to the Eass field.
func (o *ACProfile) SetEass(v []EasDetail) {
o.Eass = v
}
func (o ACProfile) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ACProfile) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["acId"] = o.AcId
if !IsNil(o.AcType) {
toSerialize["acType"] = o.AcType
}
if !IsNil(o.PrefEcsps) {
toSerialize["prefEcsps"] = o.PrefEcsps
}
if !IsNil(o.AcSchedule) {
toSerialize["acSchedule"] = o.AcSchedule
}
if !IsNil(o.ExpAcGeoServArea) {
toSerialize["expAcGeoServArea"] = o.ExpAcGeoServArea
}
if !IsNil(o.AcSvcContSupp) {
toSerialize["acSvcContSupp"] = o.AcSvcContSupp
}
if !IsNil(o.Eass) {
toSerialize["eass"] = o.Eass
}
return toSerialize, nil
}
func (o *ACProfile) 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{
"acId",
}
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)
}
}
varACProfile := _ACProfile{}
err = json.Unmarshal(bytes, &varACProfile)
if err != nil {
return err
}
*o = ACProfile(varACProfile)
return err
}
type NullableACProfile struct {
value *ACProfile
isSet bool
}
func (v NullableACProfile) Get() *ACProfile {
return v.value
}
func (v *NullableACProfile) Set(val *ACProfile) {
v.value = val
v.isSet = true
}
func (v NullableACProfile) IsSet() bool {
return v.isSet
}
func (v *NullableACProfile) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableACProfile(val *ACProfile) *NullableACProfile {
return &NullableACProfile{value: val, isSet: true}
}
func (v NullableACProfile) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableACProfile) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助