1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_pc_event_notification.go 20.44 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
/*
Npcf_EventExposure
PCF Event Exposure Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Npcf_EventExposure
import (
"encoding/json"
"fmt"
"time"
)
// checks if the PcEventNotification type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PcEventNotification{}
// PcEventNotification Represents the information reported for a Policy Control event.
type PcEventNotification struct {
Event PcEvent `json:"event"`
AccType *AccessType `json:"accType,omitempty"`
AddAccessInfo *AdditionalAccessInfo `json:"addAccessInfo,omitempty"`
RelAccessInfo *AdditionalAccessInfo `json:"relAccessInfo,omitempty"`
AnGwAddr NullableAnGwAddress `json:"anGwAddr,omitempty"`
RatType *RatType `json:"ratType,omitempty"`
PlmnId *PlmnIdNid `json:"plmnId,omitempty"`
SatBackhaulCategory *SatelliteBackhaulCategory `json:"satBackhaulCategory,omitempty"`
AppliedCov *ServiceAreaCoverageInfo `json:"appliedCov,omitempty"`
// String identifying a Supi that shall contain either an IMSI, a network specific identifier, a Global Cable Identifier (GCI) or a Global Line Identifier (GLI) as specified in clause 2.2A of 3GPP TS 23.003. It shall be formatted as follows - for an IMSI \"imsi-<imsi>\", where <imsi> shall be formatted according to clause 2.2 of 3GPP TS 23.003 that describes an IMSI. - for a network specific identifier \"nai-<nai>, where <nai> shall be formatted according to clause 28.7.2 of 3GPP TS 23.003 that describes an NAI. - for a GCI \"gci-<gci>\", where <gci> shall be formatted according to clause 28.15.2 of 3GPP TS 23.003. - for a GLI \"gli-<gli>\", where <gli> shall be formatted according to clause 28.16.2 of 3GPP TS 23.003.To enable that the value is used as part of an URI, the string shall only contain characters allowed according to the \"lower-with-hyphen\" naming convention defined in 3GPP TS 29.501.
Supi *string `json:"supi,omitempty"`
// String identifying a Gpsi shall contain either an External Id or an MSISDN. It shall be formatted as follows -External Identifier= \"extid-'extid', where 'extid' shall be formatted according to clause 19.7.2 of 3GPP TS 23.003 that describes an External Identifier.
Gpsi *string `json:"gpsi,omitempty"`
// string with format 'date-time' as defined in OpenAPI.
TimeStamp time.Time `json:"timeStamp"`
PduSessionInfo NullablePduSessionInformation `json:"pduSessionInfo,omitempty"`
RepServices *ServiceIdentification `json:"repServices,omitempty"`
DelivFailure *Failure `json:"delivFailure,omitempty"`
}
type _PcEventNotification PcEventNotification
// NewPcEventNotification instantiates a new PcEventNotification 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 NewPcEventNotification(event PcEvent, timeStamp time.Time) *PcEventNotification {
this := PcEventNotification{}
this.Event = event
this.TimeStamp = timeStamp
return &this
}
// NewPcEventNotificationWithDefaults instantiates a new PcEventNotification 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 NewPcEventNotificationWithDefaults() *PcEventNotification {
this := PcEventNotification{}
return &this
}
// GetEvent returns the Event field value
func (o *PcEventNotification) GetEvent() PcEvent {
if o == nil {
var ret PcEvent
return ret
}
return o.Event
}
// GetEventOk returns a tuple with the Event field value
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetEventOk() (*PcEvent, bool) {
if o == nil {
return nil, false
}
return &o.Event, true
}
// SetEvent sets field value
func (o *PcEventNotification) SetEvent(v PcEvent) {
o.Event = v
}
// GetAccType returns the AccType field value if set, zero value otherwise.
func (o *PcEventNotification) GetAccType() AccessType {
if o == nil || IsNil(o.AccType) {
var ret AccessType
return ret
}
return *o.AccType
}
// GetAccTypeOk returns a tuple with the AccType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetAccTypeOk() (*AccessType, bool) {
if o == nil || IsNil(o.AccType) {
return nil, false
}
return o.AccType, true
}
// HasAccType returns a boolean if a field has been set.
func (o *PcEventNotification) HasAccType() bool {
if o != nil && !IsNil(o.AccType) {
return true
}
return false
}
// SetAccType gets a reference to the given AccessType and assigns it to the AccType field.
func (o *PcEventNotification) SetAccType(v AccessType) {
o.AccType = &v
}
// GetAddAccessInfo returns the AddAccessInfo field value if set, zero value otherwise.
func (o *PcEventNotification) GetAddAccessInfo() AdditionalAccessInfo {
if o == nil || IsNil(o.AddAccessInfo) {
var ret AdditionalAccessInfo
return ret
}
return *o.AddAccessInfo
}
// GetAddAccessInfoOk returns a tuple with the AddAccessInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetAddAccessInfoOk() (*AdditionalAccessInfo, bool) {
if o == nil || IsNil(o.AddAccessInfo) {
return nil, false
}
return o.AddAccessInfo, true
}
// HasAddAccessInfo returns a boolean if a field has been set.
func (o *PcEventNotification) HasAddAccessInfo() bool {
if o != nil && !IsNil(o.AddAccessInfo) {
return true
}
return false
}
// SetAddAccessInfo gets a reference to the given AdditionalAccessInfo and assigns it to the AddAccessInfo field.
func (o *PcEventNotification) SetAddAccessInfo(v AdditionalAccessInfo) {
o.AddAccessInfo = &v
}
// GetRelAccessInfo returns the RelAccessInfo field value if set, zero value otherwise.
func (o *PcEventNotification) GetRelAccessInfo() AdditionalAccessInfo {
if o == nil || IsNil(o.RelAccessInfo) {
var ret AdditionalAccessInfo
return ret
}
return *o.RelAccessInfo
}
// GetRelAccessInfoOk returns a tuple with the RelAccessInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetRelAccessInfoOk() (*AdditionalAccessInfo, bool) {
if o == nil || IsNil(o.RelAccessInfo) {
return nil, false
}
return o.RelAccessInfo, true
}
// HasRelAccessInfo returns a boolean if a field has been set.
func (o *PcEventNotification) HasRelAccessInfo() bool {
if o != nil && !IsNil(o.RelAccessInfo) {
return true
}
return false
}
// SetRelAccessInfo gets a reference to the given AdditionalAccessInfo and assigns it to the RelAccessInfo field.
func (o *PcEventNotification) SetRelAccessInfo(v AdditionalAccessInfo) {
o.RelAccessInfo = &v
}
// GetAnGwAddr returns the AnGwAddr field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PcEventNotification) GetAnGwAddr() AnGwAddress {
if o == nil || IsNil(o.AnGwAddr.Get()) {
var ret AnGwAddress
return ret
}
return *o.AnGwAddr.Get()
}
// GetAnGwAddrOk returns a tuple with the AnGwAddr field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *PcEventNotification) GetAnGwAddrOk() (*AnGwAddress, bool) {
if o == nil {
return nil, false
}
return o.AnGwAddr.Get(), o.AnGwAddr.IsSet()
}
// HasAnGwAddr returns a boolean if a field has been set.
func (o *PcEventNotification) HasAnGwAddr() bool {
if o != nil && o.AnGwAddr.IsSet() {
return true
}
return false
}
// SetAnGwAddr gets a reference to the given NullableAnGwAddress and assigns it to the AnGwAddr field.
func (o *PcEventNotification) SetAnGwAddr(v AnGwAddress) {
o.AnGwAddr.Set(&v)
}
// SetAnGwAddrNil sets the value for AnGwAddr to be an explicit nil
func (o *PcEventNotification) SetAnGwAddrNil() {
o.AnGwAddr.Set(nil)
}
// UnsetAnGwAddr ensures that no value is present for AnGwAddr, not even an explicit nil
func (o *PcEventNotification) UnsetAnGwAddr() {
o.AnGwAddr.Unset()
}
// GetRatType returns the RatType field value if set, zero value otherwise.
func (o *PcEventNotification) GetRatType() RatType {
if o == nil || IsNil(o.RatType) {
var ret RatType
return ret
}
return *o.RatType
}
// GetRatTypeOk returns a tuple with the RatType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetRatTypeOk() (*RatType, bool) {
if o == nil || IsNil(o.RatType) {
return nil, false
}
return o.RatType, true
}
// HasRatType returns a boolean if a field has been set.
func (o *PcEventNotification) HasRatType() bool {
if o != nil && !IsNil(o.RatType) {
return true
}
return false
}
// SetRatType gets a reference to the given RatType and assigns it to the RatType field.
func (o *PcEventNotification) SetRatType(v RatType) {
o.RatType = &v
}
// GetPlmnId returns the PlmnId field value if set, zero value otherwise.
func (o *PcEventNotification) GetPlmnId() PlmnIdNid {
if o == nil || IsNil(o.PlmnId) {
var ret PlmnIdNid
return ret
}
return *o.PlmnId
}
// GetPlmnIdOk returns a tuple with the PlmnId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetPlmnIdOk() (*PlmnIdNid, bool) {
if o == nil || IsNil(o.PlmnId) {
return nil, false
}
return o.PlmnId, true
}
// HasPlmnId returns a boolean if a field has been set.
func (o *PcEventNotification) HasPlmnId() bool {
if o != nil && !IsNil(o.PlmnId) {
return true
}
return false
}
// SetPlmnId gets a reference to the given PlmnIdNid and assigns it to the PlmnId field.
func (o *PcEventNotification) SetPlmnId(v PlmnIdNid) {
o.PlmnId = &v
}
// GetSatBackhaulCategory returns the SatBackhaulCategory field value if set, zero value otherwise.
func (o *PcEventNotification) GetSatBackhaulCategory() SatelliteBackhaulCategory {
if o == nil || IsNil(o.SatBackhaulCategory) {
var ret SatelliteBackhaulCategory
return ret
}
return *o.SatBackhaulCategory
}
// GetSatBackhaulCategoryOk returns a tuple with the SatBackhaulCategory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetSatBackhaulCategoryOk() (*SatelliteBackhaulCategory, bool) {
if o == nil || IsNil(o.SatBackhaulCategory) {
return nil, false
}
return o.SatBackhaulCategory, true
}
// HasSatBackhaulCategory returns a boolean if a field has been set.
func (o *PcEventNotification) HasSatBackhaulCategory() bool {
if o != nil && !IsNil(o.SatBackhaulCategory) {
return true
}
return false
}
// SetSatBackhaulCategory gets a reference to the given SatelliteBackhaulCategory and assigns it to the SatBackhaulCategory field.
func (o *PcEventNotification) SetSatBackhaulCategory(v SatelliteBackhaulCategory) {
o.SatBackhaulCategory = &v
}
// GetAppliedCov returns the AppliedCov field value if set, zero value otherwise.
func (o *PcEventNotification) GetAppliedCov() ServiceAreaCoverageInfo {
if o == nil || IsNil(o.AppliedCov) {
var ret ServiceAreaCoverageInfo
return ret
}
return *o.AppliedCov
}
// GetAppliedCovOk returns a tuple with the AppliedCov field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetAppliedCovOk() (*ServiceAreaCoverageInfo, bool) {
if o == nil || IsNil(o.AppliedCov) {
return nil, false
}
return o.AppliedCov, true
}
// HasAppliedCov returns a boolean if a field has been set.
func (o *PcEventNotification) HasAppliedCov() bool {
if o != nil && !IsNil(o.AppliedCov) {
return true
}
return false
}
// SetAppliedCov gets a reference to the given ServiceAreaCoverageInfo and assigns it to the AppliedCov field.
func (o *PcEventNotification) SetAppliedCov(v ServiceAreaCoverageInfo) {
o.AppliedCov = &v
}
// GetSupi returns the Supi field value if set, zero value otherwise.
func (o *PcEventNotification) GetSupi() string {
if o == nil || IsNil(o.Supi) {
var ret string
return ret
}
return *o.Supi
}
// GetSupiOk returns a tuple with the Supi field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetSupiOk() (*string, bool) {
if o == nil || IsNil(o.Supi) {
return nil, false
}
return o.Supi, true
}
// HasSupi returns a boolean if a field has been set.
func (o *PcEventNotification) HasSupi() bool {
if o != nil && !IsNil(o.Supi) {
return true
}
return false
}
// SetSupi gets a reference to the given string and assigns it to the Supi field.
func (o *PcEventNotification) SetSupi(v string) {
o.Supi = &v
}
// GetGpsi returns the Gpsi field value if set, zero value otherwise.
func (o *PcEventNotification) GetGpsi() string {
if o == nil || IsNil(o.Gpsi) {
var ret string
return ret
}
return *o.Gpsi
}
// GetGpsiOk returns a tuple with the Gpsi field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetGpsiOk() (*string, bool) {
if o == nil || IsNil(o.Gpsi) {
return nil, false
}
return o.Gpsi, true
}
// HasGpsi returns a boolean if a field has been set.
func (o *PcEventNotification) HasGpsi() bool {
if o != nil && !IsNil(o.Gpsi) {
return true
}
return false
}
// SetGpsi gets a reference to the given string and assigns it to the Gpsi field.
func (o *PcEventNotification) SetGpsi(v string) {
o.Gpsi = &v
}
// GetTimeStamp returns the TimeStamp field value
func (o *PcEventNotification) GetTimeStamp() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.TimeStamp
}
// GetTimeStampOk returns a tuple with the TimeStamp field value
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetTimeStampOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.TimeStamp, true
}
// SetTimeStamp sets field value
func (o *PcEventNotification) SetTimeStamp(v time.Time) {
o.TimeStamp = v
}
// GetPduSessionInfo returns the PduSessionInfo field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PcEventNotification) GetPduSessionInfo() PduSessionInformation {
if o == nil || IsNil(o.PduSessionInfo.Get()) {
var ret PduSessionInformation
return ret
}
return *o.PduSessionInfo.Get()
}
// GetPduSessionInfoOk returns a tuple with the PduSessionInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *PcEventNotification) GetPduSessionInfoOk() (*PduSessionInformation, bool) {
if o == nil {
return nil, false
}
return o.PduSessionInfo.Get(), o.PduSessionInfo.IsSet()
}
// HasPduSessionInfo returns a boolean if a field has been set.
func (o *PcEventNotification) HasPduSessionInfo() bool {
if o != nil && o.PduSessionInfo.IsSet() {
return true
}
return false
}
// SetPduSessionInfo gets a reference to the given NullablePduSessionInformation and assigns it to the PduSessionInfo field.
func (o *PcEventNotification) SetPduSessionInfo(v PduSessionInformation) {
o.PduSessionInfo.Set(&v)
}
// SetPduSessionInfoNil sets the value for PduSessionInfo to be an explicit nil
func (o *PcEventNotification) SetPduSessionInfoNil() {
o.PduSessionInfo.Set(nil)
}
// UnsetPduSessionInfo ensures that no value is present for PduSessionInfo, not even an explicit nil
func (o *PcEventNotification) UnsetPduSessionInfo() {
o.PduSessionInfo.Unset()
}
// GetRepServices returns the RepServices field value if set, zero value otherwise.
func (o *PcEventNotification) GetRepServices() ServiceIdentification {
if o == nil || IsNil(o.RepServices) {
var ret ServiceIdentification
return ret
}
return *o.RepServices
}
// GetRepServicesOk returns a tuple with the RepServices field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetRepServicesOk() (*ServiceIdentification, bool) {
if o == nil || IsNil(o.RepServices) {
return nil, false
}
return o.RepServices, true
}
// HasRepServices returns a boolean if a field has been set.
func (o *PcEventNotification) HasRepServices() bool {
if o != nil && !IsNil(o.RepServices) {
return true
}
return false
}
// SetRepServices gets a reference to the given ServiceIdentification and assigns it to the RepServices field.
func (o *PcEventNotification) SetRepServices(v ServiceIdentification) {
o.RepServices = &v
}
// GetDelivFailure returns the DelivFailure field value if set, zero value otherwise.
func (o *PcEventNotification) GetDelivFailure() Failure {
if o == nil || IsNil(o.DelivFailure) {
var ret Failure
return ret
}
return *o.DelivFailure
}
// GetDelivFailureOk returns a tuple with the DelivFailure field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PcEventNotification) GetDelivFailureOk() (*Failure, bool) {
if o == nil || IsNil(o.DelivFailure) {
return nil, false
}
return o.DelivFailure, true
}
// HasDelivFailure returns a boolean if a field has been set.
func (o *PcEventNotification) HasDelivFailure() bool {
if o != nil && !IsNil(o.DelivFailure) {
return true
}
return false
}
// SetDelivFailure gets a reference to the given Failure and assigns it to the DelivFailure field.
func (o *PcEventNotification) SetDelivFailure(v Failure) {
o.DelivFailure = &v
}
func (o PcEventNotification) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PcEventNotification) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["event"] = o.Event
if !IsNil(o.AccType) {
toSerialize["accType"] = o.AccType
}
if !IsNil(o.AddAccessInfo) {
toSerialize["addAccessInfo"] = o.AddAccessInfo
}
if !IsNil(o.RelAccessInfo) {
toSerialize["relAccessInfo"] = o.RelAccessInfo
}
if o.AnGwAddr.IsSet() {
toSerialize["anGwAddr"] = o.AnGwAddr.Get()
}
if !IsNil(o.RatType) {
toSerialize["ratType"] = o.RatType
}
if !IsNil(o.PlmnId) {
toSerialize["plmnId"] = o.PlmnId
}
if !IsNil(o.SatBackhaulCategory) {
toSerialize["satBackhaulCategory"] = o.SatBackhaulCategory
}
if !IsNil(o.AppliedCov) {
toSerialize["appliedCov"] = o.AppliedCov
}
if !IsNil(o.Supi) {
toSerialize["supi"] = o.Supi
}
if !IsNil(o.Gpsi) {
toSerialize["gpsi"] = o.Gpsi
}
toSerialize["timeStamp"] = o.TimeStamp
if o.PduSessionInfo.IsSet() {
toSerialize["pduSessionInfo"] = o.PduSessionInfo.Get()
}
if !IsNil(o.RepServices) {
toSerialize["repServices"] = o.RepServices
}
if !IsNil(o.DelivFailure) {
toSerialize["delivFailure"] = o.DelivFailure
}
return toSerialize, nil
}
func (o *PcEventNotification) 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{
"event",
"timeStamp",
}
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)
}
}
varPcEventNotification := _PcEventNotification{}
err = json.Unmarshal(bytes, &varPcEventNotification)
if err != nil {
return err
}
*o = PcEventNotification(varPcEventNotification)
return err
}
type NullablePcEventNotification struct {
value *PcEventNotification
isSet bool
}
func (v NullablePcEventNotification) Get() *PcEventNotification {
return v.value
}
func (v *NullablePcEventNotification) Set(val *PcEventNotification) {
v.value = val
v.isSet = true
}
func (v NullablePcEventNotification) IsSet() bool {
return v.isSet
}
func (v *NullablePcEventNotification) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePcEventNotification(val *PcEventNotification) *NullablePcEventNotification {
return &NullablePcEventNotification{value: val, isSet: true}
}
func (v NullablePcEventNotification) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePcEventNotification) 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

搜索帮助