1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_amf_update_event_subscription_item.go 11.61 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
Namf_EventExposure
AMF Event Exposure Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Namf_EventExposure
import (
"encoding/json"
"fmt"
)
// checks if the AmfUpdateEventSubscriptionItem type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AmfUpdateEventSubscriptionItem{}
// AmfUpdateEventSubscriptionItem Document describing the modification(s) to an AMF Event Subscription
type AmfUpdateEventSubscriptionItem struct {
Op string `json:"op"`
Path string `json:"path"`
Value *AmfEvent `json:"value,omitempty"`
PresenceInfo *PresenceInfo `json:"presenceInfo,omitempty"`
ExcludeSupiList []string `json:"excludeSupiList,omitempty"`
ExcludeGpsiList []string `json:"excludeGpsiList,omitempty"`
IncludeSupiList []string `json:"includeSupiList,omitempty"`
IncludeGpsiList []string `json:"includeGpsiList,omitempty"`
}
type _AmfUpdateEventSubscriptionItem AmfUpdateEventSubscriptionItem
// NewAmfUpdateEventSubscriptionItem instantiates a new AmfUpdateEventSubscriptionItem 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 NewAmfUpdateEventSubscriptionItem(op string, path string) *AmfUpdateEventSubscriptionItem {
this := AmfUpdateEventSubscriptionItem{}
this.Op = op
this.Path = path
return &this
}
// NewAmfUpdateEventSubscriptionItemWithDefaults instantiates a new AmfUpdateEventSubscriptionItem 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 NewAmfUpdateEventSubscriptionItemWithDefaults() *AmfUpdateEventSubscriptionItem {
this := AmfUpdateEventSubscriptionItem{}
return &this
}
// GetOp returns the Op field value
func (o *AmfUpdateEventSubscriptionItem) GetOp() string {
if o == nil {
var ret string
return ret
}
return o.Op
}
// GetOpOk returns a tuple with the Op field value
// and a boolean to check if the value has been set.
func (o *AmfUpdateEventSubscriptionItem) GetOpOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Op, true
}
// SetOp sets field value
func (o *AmfUpdateEventSubscriptionItem) SetOp(v string) {
o.Op = v
}
// GetPath returns the Path field value
func (o *AmfUpdateEventSubscriptionItem) GetPath() string {
if o == nil {
var ret string
return ret
}
return o.Path
}
// GetPathOk returns a tuple with the Path field value
// and a boolean to check if the value has been set.
func (o *AmfUpdateEventSubscriptionItem) GetPathOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Path, true
}
// SetPath sets field value
func (o *AmfUpdateEventSubscriptionItem) SetPath(v string) {
o.Path = v
}
// GetValue returns the Value field value if set, zero value otherwise.
func (o *AmfUpdateEventSubscriptionItem) GetValue() AmfEvent {
if o == nil || IsNil(o.Value) {
var ret AmfEvent
return ret
}
return *o.Value
}
// GetValueOk returns a tuple with the Value field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AmfUpdateEventSubscriptionItem) GetValueOk() (*AmfEvent, bool) {
if o == nil || IsNil(o.Value) {
return nil, false
}
return o.Value, true
}
// HasValue returns a boolean if a field has been set.
func (o *AmfUpdateEventSubscriptionItem) HasValue() bool {
if o != nil && !IsNil(o.Value) {
return true
}
return false
}
// SetValue gets a reference to the given AmfEvent and assigns it to the Value field.
func (o *AmfUpdateEventSubscriptionItem) SetValue(v AmfEvent) {
o.Value = &v
}
// GetPresenceInfo returns the PresenceInfo field value if set, zero value otherwise.
func (o *AmfUpdateEventSubscriptionItem) GetPresenceInfo() PresenceInfo {
if o == nil || IsNil(o.PresenceInfo) {
var ret PresenceInfo
return ret
}
return *o.PresenceInfo
}
// GetPresenceInfoOk returns a tuple with the PresenceInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AmfUpdateEventSubscriptionItem) GetPresenceInfoOk() (*PresenceInfo, bool) {
if o == nil || IsNil(o.PresenceInfo) {
return nil, false
}
return o.PresenceInfo, true
}
// HasPresenceInfo returns a boolean if a field has been set.
func (o *AmfUpdateEventSubscriptionItem) HasPresenceInfo() bool {
if o != nil && !IsNil(o.PresenceInfo) {
return true
}
return false
}
// SetPresenceInfo gets a reference to the given PresenceInfo and assigns it to the PresenceInfo field.
func (o *AmfUpdateEventSubscriptionItem) SetPresenceInfo(v PresenceInfo) {
o.PresenceInfo = &v
}
// GetExcludeSupiList returns the ExcludeSupiList field value if set, zero value otherwise.
func (o *AmfUpdateEventSubscriptionItem) GetExcludeSupiList() []string {
if o == nil || IsNil(o.ExcludeSupiList) {
var ret []string
return ret
}
return o.ExcludeSupiList
}
// GetExcludeSupiListOk returns a tuple with the ExcludeSupiList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AmfUpdateEventSubscriptionItem) GetExcludeSupiListOk() ([]string, bool) {
if o == nil || IsNil(o.ExcludeSupiList) {
return nil, false
}
return o.ExcludeSupiList, true
}
// HasExcludeSupiList returns a boolean if a field has been set.
func (o *AmfUpdateEventSubscriptionItem) HasExcludeSupiList() bool {
if o != nil && !IsNil(o.ExcludeSupiList) {
return true
}
return false
}
// SetExcludeSupiList gets a reference to the given []string and assigns it to the ExcludeSupiList field.
func (o *AmfUpdateEventSubscriptionItem) SetExcludeSupiList(v []string) {
o.ExcludeSupiList = v
}
// GetExcludeGpsiList returns the ExcludeGpsiList field value if set, zero value otherwise.
func (o *AmfUpdateEventSubscriptionItem) GetExcludeGpsiList() []string {
if o == nil || IsNil(o.ExcludeGpsiList) {
var ret []string
return ret
}
return o.ExcludeGpsiList
}
// GetExcludeGpsiListOk returns a tuple with the ExcludeGpsiList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AmfUpdateEventSubscriptionItem) GetExcludeGpsiListOk() ([]string, bool) {
if o == nil || IsNil(o.ExcludeGpsiList) {
return nil, false
}
return o.ExcludeGpsiList, true
}
// HasExcludeGpsiList returns a boolean if a field has been set.
func (o *AmfUpdateEventSubscriptionItem) HasExcludeGpsiList() bool {
if o != nil && !IsNil(o.ExcludeGpsiList) {
return true
}
return false
}
// SetExcludeGpsiList gets a reference to the given []string and assigns it to the ExcludeGpsiList field.
func (o *AmfUpdateEventSubscriptionItem) SetExcludeGpsiList(v []string) {
o.ExcludeGpsiList = v
}
// GetIncludeSupiList returns the IncludeSupiList field value if set, zero value otherwise.
func (o *AmfUpdateEventSubscriptionItem) GetIncludeSupiList() []string {
if o == nil || IsNil(o.IncludeSupiList) {
var ret []string
return ret
}
return o.IncludeSupiList
}
// GetIncludeSupiListOk returns a tuple with the IncludeSupiList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AmfUpdateEventSubscriptionItem) GetIncludeSupiListOk() ([]string, bool) {
if o == nil || IsNil(o.IncludeSupiList) {
return nil, false
}
return o.IncludeSupiList, true
}
// HasIncludeSupiList returns a boolean if a field has been set.
func (o *AmfUpdateEventSubscriptionItem) HasIncludeSupiList() bool {
if o != nil && !IsNil(o.IncludeSupiList) {
return true
}
return false
}
// SetIncludeSupiList gets a reference to the given []string and assigns it to the IncludeSupiList field.
func (o *AmfUpdateEventSubscriptionItem) SetIncludeSupiList(v []string) {
o.IncludeSupiList = v
}
// GetIncludeGpsiList returns the IncludeGpsiList field value if set, zero value otherwise.
func (o *AmfUpdateEventSubscriptionItem) GetIncludeGpsiList() []string {
if o == nil || IsNil(o.IncludeGpsiList) {
var ret []string
return ret
}
return o.IncludeGpsiList
}
// GetIncludeGpsiListOk returns a tuple with the IncludeGpsiList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AmfUpdateEventSubscriptionItem) GetIncludeGpsiListOk() ([]string, bool) {
if o == nil || IsNil(o.IncludeGpsiList) {
return nil, false
}
return o.IncludeGpsiList, true
}
// HasIncludeGpsiList returns a boolean if a field has been set.
func (o *AmfUpdateEventSubscriptionItem) HasIncludeGpsiList() bool {
if o != nil && !IsNil(o.IncludeGpsiList) {
return true
}
return false
}
// SetIncludeGpsiList gets a reference to the given []string and assigns it to the IncludeGpsiList field.
func (o *AmfUpdateEventSubscriptionItem) SetIncludeGpsiList(v []string) {
o.IncludeGpsiList = v
}
func (o AmfUpdateEventSubscriptionItem) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AmfUpdateEventSubscriptionItem) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["op"] = o.Op
toSerialize["path"] = o.Path
if !IsNil(o.Value) {
toSerialize["value"] = o.Value
}
if !IsNil(o.PresenceInfo) {
toSerialize["presenceInfo"] = o.PresenceInfo
}
if !IsNil(o.ExcludeSupiList) {
toSerialize["excludeSupiList"] = o.ExcludeSupiList
}
if !IsNil(o.ExcludeGpsiList) {
toSerialize["excludeGpsiList"] = o.ExcludeGpsiList
}
if !IsNil(o.IncludeSupiList) {
toSerialize["includeSupiList"] = o.IncludeSupiList
}
if !IsNil(o.IncludeGpsiList) {
toSerialize["includeGpsiList"] = o.IncludeGpsiList
}
return toSerialize, nil
}
func (o *AmfUpdateEventSubscriptionItem) 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{
"op",
"path",
}
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)
}
}
varAmfUpdateEventSubscriptionItem := _AmfUpdateEventSubscriptionItem{}
err = json.Unmarshal(bytes, &varAmfUpdateEventSubscriptionItem)
if err != nil {
return err
}
*o = AmfUpdateEventSubscriptionItem(varAmfUpdateEventSubscriptionItem)
return err
}
type NullableAmfUpdateEventSubscriptionItem struct {
value *AmfUpdateEventSubscriptionItem
isSet bool
}
func (v NullableAmfUpdateEventSubscriptionItem) Get() *AmfUpdateEventSubscriptionItem {
return v.value
}
func (v *NullableAmfUpdateEventSubscriptionItem) Set(val *AmfUpdateEventSubscriptionItem) {
v.value = val
v.isSet = true
}
func (v NullableAmfUpdateEventSubscriptionItem) IsSet() bool {
return v.isSet
}
func (v *NullableAmfUpdateEventSubscriptionItem) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAmfUpdateEventSubscriptionItem(val *AmfUpdateEventSubscriptionItem) *NullableAmfUpdateEventSubscriptionItem {
return &NullableAmfUpdateEventSubscriptionItem{value: val, isSet: true}
}
func (v NullableAmfUpdateEventSubscriptionItem) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAmfUpdateEventSubscriptionItem) 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

搜索帮助