1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_bdt.go 17.95 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
/*
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 Bdt type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Bdt{}
// Bdt Represents a Background Data Transfer subscription.
type Bdt struct {
// string formatted according to IETF RFC 3986 identifying a referenced resource.
Self *string `json:"self,omitempty"`
// 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.
SupportedFeatures *string `json:"supportedFeatures,omitempty"`
VolumePerUE UsageThreshold `json:"volumePerUE"`
// Identifies the number of UEs.
NumberOfUEs int32 `json:"numberOfUEs"`
DesiredTimeWindow TimeWindow `json:"desiredTimeWindow"`
LocationArea *LocationArea `json:"locationArea,omitempty"`
LocationArea5G *LocationArea5G `json:"locationArea5G,omitempty"`
// string identifying a BDT Reference ID as defined in clause 5.3.3 of 3GPP TS 29.154.
ReferenceId *string `json:"referenceId,omitempty"`
// Identifies an offered transfer policy.
TransferPolicies []TransferPolicy `json:"transferPolicies,omitempty"`
// Identity of the selected background data transfer policy. Shall not be present in initial message exchange, can be provided by NF service consumer in a subsequent message exchange.
SelectedPolicy *int32 `json:"selectedPolicy,omitempty"`
// string containing a local identifier followed by \"@\" and a domain identifier. Both the local identifier and the domain identifier shall be encoded as strings that do not contain any \"@\" characters. See Clauses 4.6.2 and 4.6.3 of 3GPP TS 23.682 for more information.
ExternalGroupId *string `json:"externalGroupId,omitempty"`
// string formatted according to IETF RFC 3986 identifying a referenced resource.
NotificationDestination *string `json:"notificationDestination,omitempty"`
// Indicates whether the BDT warning notification is enabled (true) or not (false). Default value is false.
WarnNotifEnabled *bool `json:"warnNotifEnabled,omitempty"`
// Identify a traffic descriptor as defined in Figure 5.2.2 of 3GPP TS 24.526, octets v+5 to w.
TrafficDes *string `json:"trafficDes,omitempty"`
}
type _Bdt Bdt
// NewBdt instantiates a new Bdt 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 NewBdt(volumePerUE UsageThreshold, numberOfUEs int32, desiredTimeWindow TimeWindow) *Bdt {
this := Bdt{}
this.VolumePerUE = volumePerUE
this.NumberOfUEs = numberOfUEs
this.DesiredTimeWindow = desiredTimeWindow
return &this
}
// NewBdtWithDefaults instantiates a new Bdt 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 NewBdtWithDefaults() *Bdt {
this := Bdt{}
return &this
}
// GetSelf returns the Self field value if set, zero value otherwise.
func (o *Bdt) GetSelf() string {
if o == nil || IsNil(o.Self) {
var ret string
return ret
}
return *o.Self
}
// GetSelfOk returns a tuple with the Self field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetSelfOk() (*string, bool) {
if o == nil || IsNil(o.Self) {
return nil, false
}
return o.Self, true
}
// HasSelf returns a boolean if a field has been set.
func (o *Bdt) HasSelf() bool {
if o != nil && !IsNil(o.Self) {
return true
}
return false
}
// SetSelf gets a reference to the given string and assigns it to the Self field.
func (o *Bdt) SetSelf(v string) {
o.Self = &v
}
// GetSupportedFeatures returns the SupportedFeatures field value if set, zero value otherwise.
func (o *Bdt) GetSupportedFeatures() string {
if o == nil || IsNil(o.SupportedFeatures) {
var ret string
return ret
}
return *o.SupportedFeatures
}
// GetSupportedFeaturesOk returns a tuple with the SupportedFeatures field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetSupportedFeaturesOk() (*string, bool) {
if o == nil || IsNil(o.SupportedFeatures) {
return nil, false
}
return o.SupportedFeatures, true
}
// HasSupportedFeatures returns a boolean if a field has been set.
func (o *Bdt) HasSupportedFeatures() bool {
if o != nil && !IsNil(o.SupportedFeatures) {
return true
}
return false
}
// SetSupportedFeatures gets a reference to the given string and assigns it to the SupportedFeatures field.
func (o *Bdt) SetSupportedFeatures(v string) {
o.SupportedFeatures = &v
}
// GetVolumePerUE returns the VolumePerUE field value
func (o *Bdt) GetVolumePerUE() UsageThreshold {
if o == nil {
var ret UsageThreshold
return ret
}
return o.VolumePerUE
}
// GetVolumePerUEOk returns a tuple with the VolumePerUE field value
// and a boolean to check if the value has been set.
func (o *Bdt) GetVolumePerUEOk() (*UsageThreshold, bool) {
if o == nil {
return nil, false
}
return &o.VolumePerUE, true
}
// SetVolumePerUE sets field value
func (o *Bdt) SetVolumePerUE(v UsageThreshold) {
o.VolumePerUE = v
}
// GetNumberOfUEs returns the NumberOfUEs field value
func (o *Bdt) GetNumberOfUEs() int32 {
if o == nil {
var ret int32
return ret
}
return o.NumberOfUEs
}
// GetNumberOfUEsOk returns a tuple with the NumberOfUEs field value
// and a boolean to check if the value has been set.
func (o *Bdt) GetNumberOfUEsOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.NumberOfUEs, true
}
// SetNumberOfUEs sets field value
func (o *Bdt) SetNumberOfUEs(v int32) {
o.NumberOfUEs = v
}
// GetDesiredTimeWindow returns the DesiredTimeWindow field value
func (o *Bdt) GetDesiredTimeWindow() TimeWindow {
if o == nil {
var ret TimeWindow
return ret
}
return o.DesiredTimeWindow
}
// GetDesiredTimeWindowOk returns a tuple with the DesiredTimeWindow field value
// and a boolean to check if the value has been set.
func (o *Bdt) GetDesiredTimeWindowOk() (*TimeWindow, bool) {
if o == nil {
return nil, false
}
return &o.DesiredTimeWindow, true
}
// SetDesiredTimeWindow sets field value
func (o *Bdt) SetDesiredTimeWindow(v TimeWindow) {
o.DesiredTimeWindow = v
}
// GetLocationArea returns the LocationArea field value if set, zero value otherwise.
func (o *Bdt) GetLocationArea() LocationArea {
if o == nil || IsNil(o.LocationArea) {
var ret LocationArea
return ret
}
return *o.LocationArea
}
// GetLocationAreaOk returns a tuple with the LocationArea field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetLocationAreaOk() (*LocationArea, bool) {
if o == nil || IsNil(o.LocationArea) {
return nil, false
}
return o.LocationArea, true
}
// HasLocationArea returns a boolean if a field has been set.
func (o *Bdt) HasLocationArea() bool {
if o != nil && !IsNil(o.LocationArea) {
return true
}
return false
}
// SetLocationArea gets a reference to the given LocationArea and assigns it to the LocationArea field.
func (o *Bdt) SetLocationArea(v LocationArea) {
o.LocationArea = &v
}
// GetLocationArea5G returns the LocationArea5G field value if set, zero value otherwise.
func (o *Bdt) 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 *Bdt) 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 *Bdt) 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 *Bdt) SetLocationArea5G(v LocationArea5G) {
o.LocationArea5G = &v
}
// GetReferenceId returns the ReferenceId field value if set, zero value otherwise.
func (o *Bdt) GetReferenceId() string {
if o == nil || IsNil(o.ReferenceId) {
var ret string
return ret
}
return *o.ReferenceId
}
// GetReferenceIdOk returns a tuple with the ReferenceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetReferenceIdOk() (*string, bool) {
if o == nil || IsNil(o.ReferenceId) {
return nil, false
}
return o.ReferenceId, true
}
// HasReferenceId returns a boolean if a field has been set.
func (o *Bdt) HasReferenceId() bool {
if o != nil && !IsNil(o.ReferenceId) {
return true
}
return false
}
// SetReferenceId gets a reference to the given string and assigns it to the ReferenceId field.
func (o *Bdt) SetReferenceId(v string) {
o.ReferenceId = &v
}
// GetTransferPolicies returns the TransferPolicies field value if set, zero value otherwise.
func (o *Bdt) GetTransferPolicies() []TransferPolicy {
if o == nil || IsNil(o.TransferPolicies) {
var ret []TransferPolicy
return ret
}
return o.TransferPolicies
}
// GetTransferPoliciesOk returns a tuple with the TransferPolicies field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetTransferPoliciesOk() ([]TransferPolicy, bool) {
if o == nil || IsNil(o.TransferPolicies) {
return nil, false
}
return o.TransferPolicies, true
}
// HasTransferPolicies returns a boolean if a field has been set.
func (o *Bdt) HasTransferPolicies() bool {
if o != nil && !IsNil(o.TransferPolicies) {
return true
}
return false
}
// SetTransferPolicies gets a reference to the given []TransferPolicy and assigns it to the TransferPolicies field.
func (o *Bdt) SetTransferPolicies(v []TransferPolicy) {
o.TransferPolicies = v
}
// GetSelectedPolicy returns the SelectedPolicy field value if set, zero value otherwise.
func (o *Bdt) GetSelectedPolicy() int32 {
if o == nil || IsNil(o.SelectedPolicy) {
var ret int32
return ret
}
return *o.SelectedPolicy
}
// GetSelectedPolicyOk returns a tuple with the SelectedPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetSelectedPolicyOk() (*int32, bool) {
if o == nil || IsNil(o.SelectedPolicy) {
return nil, false
}
return o.SelectedPolicy, true
}
// HasSelectedPolicy returns a boolean if a field has been set.
func (o *Bdt) HasSelectedPolicy() bool {
if o != nil && !IsNil(o.SelectedPolicy) {
return true
}
return false
}
// SetSelectedPolicy gets a reference to the given int32 and assigns it to the SelectedPolicy field.
func (o *Bdt) SetSelectedPolicy(v int32) {
o.SelectedPolicy = &v
}
// GetExternalGroupId returns the ExternalGroupId field value if set, zero value otherwise.
func (o *Bdt) GetExternalGroupId() string {
if o == nil || IsNil(o.ExternalGroupId) {
var ret string
return ret
}
return *o.ExternalGroupId
}
// GetExternalGroupIdOk returns a tuple with the ExternalGroupId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetExternalGroupIdOk() (*string, bool) {
if o == nil || IsNil(o.ExternalGroupId) {
return nil, false
}
return o.ExternalGroupId, true
}
// HasExternalGroupId returns a boolean if a field has been set.
func (o *Bdt) HasExternalGroupId() bool {
if o != nil && !IsNil(o.ExternalGroupId) {
return true
}
return false
}
// SetExternalGroupId gets a reference to the given string and assigns it to the ExternalGroupId field.
func (o *Bdt) SetExternalGroupId(v string) {
o.ExternalGroupId = &v
}
// GetNotificationDestination returns the NotificationDestination field value if set, zero value otherwise.
func (o *Bdt) GetNotificationDestination() string {
if o == nil || IsNil(o.NotificationDestination) {
var ret string
return ret
}
return *o.NotificationDestination
}
// GetNotificationDestinationOk returns a tuple with the NotificationDestination field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetNotificationDestinationOk() (*string, bool) {
if o == nil || IsNil(o.NotificationDestination) {
return nil, false
}
return o.NotificationDestination, true
}
// HasNotificationDestination returns a boolean if a field has been set.
func (o *Bdt) HasNotificationDestination() bool {
if o != nil && !IsNil(o.NotificationDestination) {
return true
}
return false
}
// SetNotificationDestination gets a reference to the given string and assigns it to the NotificationDestination field.
func (o *Bdt) SetNotificationDestination(v string) {
o.NotificationDestination = &v
}
// GetWarnNotifEnabled returns the WarnNotifEnabled field value if set, zero value otherwise.
func (o *Bdt) GetWarnNotifEnabled() bool {
if o == nil || IsNil(o.WarnNotifEnabled) {
var ret bool
return ret
}
return *o.WarnNotifEnabled
}
// GetWarnNotifEnabledOk returns a tuple with the WarnNotifEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetWarnNotifEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.WarnNotifEnabled) {
return nil, false
}
return o.WarnNotifEnabled, true
}
// HasWarnNotifEnabled returns a boolean if a field has been set.
func (o *Bdt) HasWarnNotifEnabled() bool {
if o != nil && !IsNil(o.WarnNotifEnabled) {
return true
}
return false
}
// SetWarnNotifEnabled gets a reference to the given bool and assigns it to the WarnNotifEnabled field.
func (o *Bdt) SetWarnNotifEnabled(v bool) {
o.WarnNotifEnabled = &v
}
// GetTrafficDes returns the TrafficDes field value if set, zero value otherwise.
func (o *Bdt) GetTrafficDes() string {
if o == nil || IsNil(o.TrafficDes) {
var ret string
return ret
}
return *o.TrafficDes
}
// GetTrafficDesOk returns a tuple with the TrafficDes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Bdt) GetTrafficDesOk() (*string, bool) {
if o == nil || IsNil(o.TrafficDes) {
return nil, false
}
return o.TrafficDes, true
}
// HasTrafficDes returns a boolean if a field has been set.
func (o *Bdt) HasTrafficDes() bool {
if o != nil && !IsNil(o.TrafficDes) {
return true
}
return false
}
// SetTrafficDes gets a reference to the given string and assigns it to the TrafficDes field.
func (o *Bdt) SetTrafficDes(v string) {
o.TrafficDes = &v
}
func (o Bdt) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Bdt) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Self) {
toSerialize["self"] = o.Self
}
if !IsNil(o.SupportedFeatures) {
toSerialize["supportedFeatures"] = o.SupportedFeatures
}
toSerialize["volumePerUE"] = o.VolumePerUE
toSerialize["numberOfUEs"] = o.NumberOfUEs
toSerialize["desiredTimeWindow"] = o.DesiredTimeWindow
if !IsNil(o.LocationArea) {
toSerialize["locationArea"] = o.LocationArea
}
if !IsNil(o.LocationArea5G) {
toSerialize["locationArea5G"] = o.LocationArea5G
}
if !IsNil(o.ReferenceId) {
toSerialize["referenceId"] = o.ReferenceId
}
if !IsNil(o.TransferPolicies) {
toSerialize["transferPolicies"] = o.TransferPolicies
}
if !IsNil(o.SelectedPolicy) {
toSerialize["selectedPolicy"] = o.SelectedPolicy
}
if !IsNil(o.ExternalGroupId) {
toSerialize["externalGroupId"] = o.ExternalGroupId
}
if !IsNil(o.NotificationDestination) {
toSerialize["notificationDestination"] = o.NotificationDestination
}
if !IsNil(o.WarnNotifEnabled) {
toSerialize["warnNotifEnabled"] = o.WarnNotifEnabled
}
if !IsNil(o.TrafficDes) {
toSerialize["trafficDes"] = o.TrafficDes
}
return toSerialize, nil
}
func (o *Bdt) 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{
"volumePerUE",
"numberOfUEs",
"desiredTimeWindow",
}
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)
}
}
varBdt := _Bdt{}
err = json.Unmarshal(bytes, &varBdt)
if err != nil {
return err
}
*o = Bdt(varBdt)
return err
}
type NullableBdt struct {
value *Bdt
isSet bool
}
func (v NullableBdt) Get() *Bdt {
return v.value
}
func (v *NullableBdt) Set(val *Bdt) {
v.value = val
v.isSet = true
}
func (v NullableBdt) IsSet() bool {
return v.isSet
}
func (v *NullableBdt) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBdt(val *Bdt) *NullableBdt {
return &NullableBdt{value: val, isSet: true}
}
func (v NullableBdt) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBdt) 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

搜索帮助