1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_ex_notification.go 7.18 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
3gpp-bdt
API for BDT resouce management. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_ResourceManagementOfBdt
import (
"encoding/json"
"fmt"
)
// checks if the ExNotification type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ExNotification{}
// ExNotification Represents a Background Data Transfer notification.
type ExNotification struct {
// string identifying a BDT Reference ID as defined in clause 5.3.3 of 3GPP TS 29.154.
BdtRefId string `json:"bdtRefId"`
LocationArea5G *LocationArea5G `json:"locationArea5G,omitempty"`
TimeWindow *TimeWindow `json:"timeWindow,omitempty"`
// This IE indicates a list of the candidate transfer policies from which the AF may select a new transfer policy due to network performance degradation.
CandPolicies []TransferPolicy `json:"candPolicies,omitempty"`
}
type _ExNotification ExNotification
// NewExNotification instantiates a new ExNotification 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 NewExNotification(bdtRefId string) *ExNotification {
this := ExNotification{}
this.BdtRefId = bdtRefId
return &this
}
// NewExNotificationWithDefaults instantiates a new ExNotification 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 NewExNotificationWithDefaults() *ExNotification {
this := ExNotification{}
return &this
}
// GetBdtRefId returns the BdtRefId field value
func (o *ExNotification) GetBdtRefId() string {
if o == nil {
var ret string
return ret
}
return o.BdtRefId
}
// GetBdtRefIdOk returns a tuple with the BdtRefId field value
// and a boolean to check if the value has been set.
func (o *ExNotification) GetBdtRefIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.BdtRefId, true
}
// SetBdtRefId sets field value
func (o *ExNotification) SetBdtRefId(v string) {
o.BdtRefId = v
}
// GetLocationArea5G returns the LocationArea5G field value if set, zero value otherwise.
func (o *ExNotification) GetLocationArea5G() LocationArea5G {
if o == nil || IsNil(o.LocationArea5G) {
var ret LocationArea5G
return ret
}
return *o.LocationArea5G
}
// GetLocationArea5GOk returns a tuple with the LocationArea5G field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ExNotification) GetLocationArea5GOk() (*LocationArea5G, bool) {
if o == nil || IsNil(o.LocationArea5G) {
return nil, false
}
return o.LocationArea5G, true
}
// HasLocationArea5G returns a boolean if a field has been set.
func (o *ExNotification) HasLocationArea5G() bool {
if o != nil && !IsNil(o.LocationArea5G) {
return true
}
return false
}
// SetLocationArea5G gets a reference to the given LocationArea5G and assigns it to the LocationArea5G field.
func (o *ExNotification) SetLocationArea5G(v LocationArea5G) {
o.LocationArea5G = &v
}
// GetTimeWindow returns the TimeWindow field value if set, zero value otherwise.
func (o *ExNotification) GetTimeWindow() TimeWindow {
if o == nil || IsNil(o.TimeWindow) {
var ret TimeWindow
return ret
}
return *o.TimeWindow
}
// GetTimeWindowOk returns a tuple with the TimeWindow field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ExNotification) GetTimeWindowOk() (*TimeWindow, bool) {
if o == nil || IsNil(o.TimeWindow) {
return nil, false
}
return o.TimeWindow, true
}
// HasTimeWindow returns a boolean if a field has been set.
func (o *ExNotification) HasTimeWindow() bool {
if o != nil && !IsNil(o.TimeWindow) {
return true
}
return false
}
// SetTimeWindow gets a reference to the given TimeWindow and assigns it to the TimeWindow field.
func (o *ExNotification) SetTimeWindow(v TimeWindow) {
o.TimeWindow = &v
}
// GetCandPolicies returns the CandPolicies field value if set, zero value otherwise.
func (o *ExNotification) GetCandPolicies() []TransferPolicy {
if o == nil || IsNil(o.CandPolicies) {
var ret []TransferPolicy
return ret
}
return o.CandPolicies
}
// GetCandPoliciesOk returns a tuple with the CandPolicies field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ExNotification) GetCandPoliciesOk() ([]TransferPolicy, bool) {
if o == nil || IsNil(o.CandPolicies) {
return nil, false
}
return o.CandPolicies, true
}
// HasCandPolicies returns a boolean if a field has been set.
func (o *ExNotification) HasCandPolicies() bool {
if o != nil && !IsNil(o.CandPolicies) {
return true
}
return false
}
// SetCandPolicies gets a reference to the given []TransferPolicy and assigns it to the CandPolicies field.
func (o *ExNotification) SetCandPolicies(v []TransferPolicy) {
o.CandPolicies = v
}
func (o ExNotification) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ExNotification) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["bdtRefId"] = o.BdtRefId
if !IsNil(o.LocationArea5G) {
toSerialize["locationArea5G"] = o.LocationArea5G
}
if !IsNil(o.TimeWindow) {
toSerialize["timeWindow"] = o.TimeWindow
}
if !IsNil(o.CandPolicies) {
toSerialize["candPolicies"] = o.CandPolicies
}
return toSerialize, nil
}
func (o *ExNotification) 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{
"bdtRefId",
}
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)
}
}
varExNotification := _ExNotification{}
err = json.Unmarshal(bytes, &varExNotification)
if err != nil {
return err
}
*o = ExNotification(varExNotification)
return err
}
type NullableExNotification struct {
value *ExNotification
isSet bool
}
func (v NullableExNotification) Get() *ExNotification {
return v.value
}
func (v *NullableExNotification) Set(val *ExNotification) {
v.value = val
v.isSet = true
}
func (v NullableExNotification) IsSet() bool {
return v.isSet
}
func (v *NullableExNotification) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableExNotification(val *ExNotification) *NullableExNotification {
return &NullableExNotification{value: val, isSet: true}
}
func (v NullableExNotification) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableExNotification) 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

搜索帮助