1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_event_subscription.go 9.71 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2年前 . update
/*
SS_Events
API for SEAL Events management. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.1.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_SS_Events
import (
"encoding/json"
"fmt"
)
// checks if the EventSubscription type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EventSubscription{}
// EventSubscription Represents the subscription to a single SEAL event.
type EventSubscription struct {
EventId SEALEvent `json:"eventId"`
// Each element of the array represents the VAL group identifier(s) of a VAL service that the subscriber wants to know in the interested event.
ValGroups []VALGroupFilter `json:"valGroups,omitempty"`
// Each element of the array represents the VAL User / UE IDs of a VAL service that the event subscriber wants to know in the interested event.
Identities []IdentityFilter `json:"identities,omitempty"`
// List of event monitoring details that the subscriber wishes to mmonitor the VAL UEs, VAL group and/or VAL service.
MonFltr []MonitorFilter `json:"monFltr,omitempty"`
// Represents the list of VAL User / UE IDs and the area of interest information which the subscriber wishes to monitor the location deviation of VAL User / UEs.
AreaInt []MonitorLocationInterestFilter `json:"areaInt,omitempty"`
// Each element represents the location area monitoring details to monitor the VA UEs moving in and out of the provided location area.
LocAreaMon []MonLocAreaInterestFltr `json:"locAreaMon,omitempty"`
}
type _EventSubscription EventSubscription
// NewEventSubscription instantiates a new EventSubscription 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 NewEventSubscription(eventId SEALEvent) *EventSubscription {
this := EventSubscription{}
this.EventId = eventId
return &this
}
// NewEventSubscriptionWithDefaults instantiates a new EventSubscription 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 NewEventSubscriptionWithDefaults() *EventSubscription {
this := EventSubscription{}
return &this
}
// GetEventId returns the EventId field value
func (o *EventSubscription) GetEventId() SEALEvent {
if o == nil {
var ret SEALEvent
return ret
}
return o.EventId
}
// GetEventIdOk returns a tuple with the EventId field value
// and a boolean to check if the value has been set.
func (o *EventSubscription) GetEventIdOk() (*SEALEvent, bool) {
if o == nil {
return nil, false
}
return &o.EventId, true
}
// SetEventId sets field value
func (o *EventSubscription) SetEventId(v SEALEvent) {
o.EventId = v
}
// GetValGroups returns the ValGroups field value if set, zero value otherwise.
func (o *EventSubscription) GetValGroups() []VALGroupFilter {
if o == nil || IsNil(o.ValGroups) {
var ret []VALGroupFilter
return ret
}
return o.ValGroups
}
// GetValGroupsOk returns a tuple with the ValGroups field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventSubscription) GetValGroupsOk() ([]VALGroupFilter, bool) {
if o == nil || IsNil(o.ValGroups) {
return nil, false
}
return o.ValGroups, true
}
// HasValGroups returns a boolean if a field has been set.
func (o *EventSubscription) HasValGroups() bool {
if o != nil && !IsNil(o.ValGroups) {
return true
}
return false
}
// SetValGroups gets a reference to the given []VALGroupFilter and assigns it to the ValGroups field.
func (o *EventSubscription) SetValGroups(v []VALGroupFilter) {
o.ValGroups = v
}
// GetIdentities returns the Identities field value if set, zero value otherwise.
func (o *EventSubscription) GetIdentities() []IdentityFilter {
if o == nil || IsNil(o.Identities) {
var ret []IdentityFilter
return ret
}
return o.Identities
}
// GetIdentitiesOk returns a tuple with the Identities field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventSubscription) GetIdentitiesOk() ([]IdentityFilter, bool) {
if o == nil || IsNil(o.Identities) {
return nil, false
}
return o.Identities, true
}
// HasIdentities returns a boolean if a field has been set.
func (o *EventSubscription) HasIdentities() bool {
if o != nil && !IsNil(o.Identities) {
return true
}
return false
}
// SetIdentities gets a reference to the given []IdentityFilter and assigns it to the Identities field.
func (o *EventSubscription) SetIdentities(v []IdentityFilter) {
o.Identities = v
}
// GetMonFltr returns the MonFltr field value if set, zero value otherwise.
func (o *EventSubscription) GetMonFltr() []MonitorFilter {
if o == nil || IsNil(o.MonFltr) {
var ret []MonitorFilter
return ret
}
return o.MonFltr
}
// GetMonFltrOk returns a tuple with the MonFltr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventSubscription) GetMonFltrOk() ([]MonitorFilter, bool) {
if o == nil || IsNil(o.MonFltr) {
return nil, false
}
return o.MonFltr, true
}
// HasMonFltr returns a boolean if a field has been set.
func (o *EventSubscription) HasMonFltr() bool {
if o != nil && !IsNil(o.MonFltr) {
return true
}
return false
}
// SetMonFltr gets a reference to the given []MonitorFilter and assigns it to the MonFltr field.
func (o *EventSubscription) SetMonFltr(v []MonitorFilter) {
o.MonFltr = v
}
// GetAreaInt returns the AreaInt field value if set, zero value otherwise.
func (o *EventSubscription) GetAreaInt() []MonitorLocationInterestFilter {
if o == nil || IsNil(o.AreaInt) {
var ret []MonitorLocationInterestFilter
return ret
}
return o.AreaInt
}
// GetAreaIntOk returns a tuple with the AreaInt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventSubscription) GetAreaIntOk() ([]MonitorLocationInterestFilter, bool) {
if o == nil || IsNil(o.AreaInt) {
return nil, false
}
return o.AreaInt, true
}
// HasAreaInt returns a boolean if a field has been set.
func (o *EventSubscription) HasAreaInt() bool {
if o != nil && !IsNil(o.AreaInt) {
return true
}
return false
}
// SetAreaInt gets a reference to the given []MonitorLocationInterestFilter and assigns it to the AreaInt field.
func (o *EventSubscription) SetAreaInt(v []MonitorLocationInterestFilter) {
o.AreaInt = v
}
// GetLocAreaMon returns the LocAreaMon field value if set, zero value otherwise.
func (o *EventSubscription) GetLocAreaMon() []MonLocAreaInterestFltr {
if o == nil || IsNil(o.LocAreaMon) {
var ret []MonLocAreaInterestFltr
return ret
}
return o.LocAreaMon
}
// GetLocAreaMonOk returns a tuple with the LocAreaMon field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventSubscription) GetLocAreaMonOk() ([]MonLocAreaInterestFltr, bool) {
if o == nil || IsNil(o.LocAreaMon) {
return nil, false
}
return o.LocAreaMon, true
}
// HasLocAreaMon returns a boolean if a field has been set.
func (o *EventSubscription) HasLocAreaMon() bool {
if o != nil && !IsNil(o.LocAreaMon) {
return true
}
return false
}
// SetLocAreaMon gets a reference to the given []MonLocAreaInterestFltr and assigns it to the LocAreaMon field.
func (o *EventSubscription) SetLocAreaMon(v []MonLocAreaInterestFltr) {
o.LocAreaMon = v
}
func (o EventSubscription) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EventSubscription) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["eventId"] = o.EventId
if !IsNil(o.ValGroups) {
toSerialize["valGroups"] = o.ValGroups
}
if !IsNil(o.Identities) {
toSerialize["identities"] = o.Identities
}
if !IsNil(o.MonFltr) {
toSerialize["monFltr"] = o.MonFltr
}
if !IsNil(o.AreaInt) {
toSerialize["areaInt"] = o.AreaInt
}
if !IsNil(o.LocAreaMon) {
toSerialize["locAreaMon"] = o.LocAreaMon
}
return toSerialize, nil
}
func (o *EventSubscription) 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{
"eventId",
}
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)
}
}
varEventSubscription := _EventSubscription{}
err = json.Unmarshal(bytes, &varEventSubscription)
if err != nil {
return err
}
*o = EventSubscription(varEventSubscription)
return err
}
type NullableEventSubscription struct {
value *EventSubscription
isSet bool
}
func (v NullableEventSubscription) Get() *EventSubscription {
return v.value
}
func (v *NullableEventSubscription) Set(val *EventSubscription) {
v.value = val
v.isSet = true
}
func (v NullableEventSubscription) IsSet() bool {
return v.isSet
}
func (v *NullableEventSubscription) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEventSubscription(val *EventSubscription) *NullableEventSubscription {
return &NullableEventSubscription{value: val, isSet: true}
}
func (v NullableEventSubscription) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEventSubscription) 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

搜索帮助