代码拉取完成,页面将自动刷新
/*
Nnwdaf_MLModelProvision
Nnwdaf_MLModelProvision API 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_Nnwdaf_MLModelProvision
import (
"encoding/json"
"fmt"
"time"
)
// checks if the MLEventSubscription type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MLEventSubscription{}
// MLEventSubscription Represents a subscription to a single event.
type MLEventSubscription struct {
MLEvent NwdafEvent `json:"mLEvent"`
MLEventFilter EventFilter `json:"mLEventFilter"`
TgtUe *TargetUeInformation `json:"tgtUe,omitempty"`
MLTargetPeriod *TimeWindow `json:"mLTargetPeriod,omitempty"`
// string with format 'date-time' as defined in OpenAPI.
ExpiryTime *time.Time `json:"expiryTime,omitempty"`
}
type _MLEventSubscription MLEventSubscription
// NewMLEventSubscription instantiates a new MLEventSubscription 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 NewMLEventSubscription(mLEvent NwdafEvent, mLEventFilter EventFilter) *MLEventSubscription {
this := MLEventSubscription{}
this.MLEvent = mLEvent
this.MLEventFilter = mLEventFilter
return &this
}
// NewMLEventSubscriptionWithDefaults instantiates a new MLEventSubscription 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 NewMLEventSubscriptionWithDefaults() *MLEventSubscription {
this := MLEventSubscription{}
return &this
}
// GetMLEvent returns the MLEvent field value
func (o *MLEventSubscription) GetMLEvent() NwdafEvent {
if o == nil {
var ret NwdafEvent
return ret
}
return o.MLEvent
}
// GetMLEventOk returns a tuple with the MLEvent field value
// and a boolean to check if the value has been set.
func (o *MLEventSubscription) GetMLEventOk() (*NwdafEvent, bool) {
if o == nil {
return nil, false
}
return &o.MLEvent, true
}
// SetMLEvent sets field value
func (o *MLEventSubscription) SetMLEvent(v NwdafEvent) {
o.MLEvent = v
}
// GetMLEventFilter returns the MLEventFilter field value
func (o *MLEventSubscription) GetMLEventFilter() EventFilter {
if o == nil {
var ret EventFilter
return ret
}
return o.MLEventFilter
}
// GetMLEventFilterOk returns a tuple with the MLEventFilter field value
// and a boolean to check if the value has been set.
func (o *MLEventSubscription) GetMLEventFilterOk() (*EventFilter, bool) {
if o == nil {
return nil, false
}
return &o.MLEventFilter, true
}
// SetMLEventFilter sets field value
func (o *MLEventSubscription) SetMLEventFilter(v EventFilter) {
o.MLEventFilter = v
}
// GetTgtUe returns the TgtUe field value if set, zero value otherwise.
func (o *MLEventSubscription) GetTgtUe() TargetUeInformation {
if o == nil || IsNil(o.TgtUe) {
var ret TargetUeInformation
return ret
}
return *o.TgtUe
}
// GetTgtUeOk returns a tuple with the TgtUe field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MLEventSubscription) GetTgtUeOk() (*TargetUeInformation, bool) {
if o == nil || IsNil(o.TgtUe) {
return nil, false
}
return o.TgtUe, true
}
// HasTgtUe returns a boolean if a field has been set.
func (o *MLEventSubscription) HasTgtUe() bool {
if o != nil && !IsNil(o.TgtUe) {
return true
}
return false
}
// SetTgtUe gets a reference to the given TargetUeInformation and assigns it to the TgtUe field.
func (o *MLEventSubscription) SetTgtUe(v TargetUeInformation) {
o.TgtUe = &v
}
// GetMLTargetPeriod returns the MLTargetPeriod field value if set, zero value otherwise.
func (o *MLEventSubscription) GetMLTargetPeriod() TimeWindow {
if o == nil || IsNil(o.MLTargetPeriod) {
var ret TimeWindow
return ret
}
return *o.MLTargetPeriod
}
// GetMLTargetPeriodOk returns a tuple with the MLTargetPeriod field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MLEventSubscription) GetMLTargetPeriodOk() (*TimeWindow, bool) {
if o == nil || IsNil(o.MLTargetPeriod) {
return nil, false
}
return o.MLTargetPeriod, true
}
// HasMLTargetPeriod returns a boolean if a field has been set.
func (o *MLEventSubscription) HasMLTargetPeriod() bool {
if o != nil && !IsNil(o.MLTargetPeriod) {
return true
}
return false
}
// SetMLTargetPeriod gets a reference to the given TimeWindow and assigns it to the MLTargetPeriod field.
func (o *MLEventSubscription) SetMLTargetPeriod(v TimeWindow) {
o.MLTargetPeriod = &v
}
// GetExpiryTime returns the ExpiryTime field value if set, zero value otherwise.
func (o *MLEventSubscription) GetExpiryTime() time.Time {
if o == nil || IsNil(o.ExpiryTime) {
var ret time.Time
return ret
}
return *o.ExpiryTime
}
// GetExpiryTimeOk returns a tuple with the ExpiryTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MLEventSubscription) GetExpiryTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.ExpiryTime) {
return nil, false
}
return o.ExpiryTime, true
}
// HasExpiryTime returns a boolean if a field has been set.
func (o *MLEventSubscription) HasExpiryTime() bool {
if o != nil && !IsNil(o.ExpiryTime) {
return true
}
return false
}
// SetExpiryTime gets a reference to the given time.Time and assigns it to the ExpiryTime field.
func (o *MLEventSubscription) SetExpiryTime(v time.Time) {
o.ExpiryTime = &v
}
func (o MLEventSubscription) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MLEventSubscription) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["mLEvent"] = o.MLEvent
toSerialize["mLEventFilter"] = o.MLEventFilter
if !IsNil(o.TgtUe) {
toSerialize["tgtUe"] = o.TgtUe
}
if !IsNil(o.MLTargetPeriod) {
toSerialize["mLTargetPeriod"] = o.MLTargetPeriod
}
if !IsNil(o.ExpiryTime) {
toSerialize["expiryTime"] = o.ExpiryTime
}
return toSerialize, nil
}
func (o *MLEventSubscription) 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{
"mLEvent",
"mLEventFilter",
}
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)
}
}
varMLEventSubscription := _MLEventSubscription{}
err = json.Unmarshal(bytes, &varMLEventSubscription)
if err != nil {
return err
}
*o = MLEventSubscription(varMLEventSubscription)
return err
}
type NullableMLEventSubscription struct {
value *MLEventSubscription
isSet bool
}
func (v NullableMLEventSubscription) Get() *MLEventSubscription {
return v.value
}
func (v *NullableMLEventSubscription) Set(val *MLEventSubscription) {
v.value = val
v.isSet = true
}
func (v NullableMLEventSubscription) IsSet() bool {
return v.isSet
}
func (v *NullableMLEventSubscription) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMLEventSubscription(val *MLEventSubscription) *NullableMLEventSubscription {
return &NullableMLEventSubscription{value: val, isSet: true}
}
func (v NullableMLEventSubscription) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMLEventSubscription) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。