代码拉取完成,页面将自动刷新
/*
3gpp-service-parameter
API for AF service paramter © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.1.3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_ServiceParameter
import (
"encoding/json"
"fmt"
)
// checks if the AfNotification type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AfNotification{}
// AfNotification Notifications upon AF Service Parameter Authorization Update e.g. to revoke the authorization, and/or AF subscribed event notification of the outcome related to the invocation of service parameter provisioning.
type AfNotification struct {
// string formatted according to IETF RFC 3986 identifying a referenced resource.
Subscription string `json:"subscription"`
ReportEvent *Event `json:"reportEvent,omitempty"`
AuthResult *AuthorizationResult `json:"authResult,omitempty"`
Gpsis []string `json:"gpsis,omitempty"`
// String representing a Data Network as defined in clause 9A of 3GPP TS 23.003; it shall contain either a DNN Network Identifier, or a full DNN with both the Network Identifier and Operator Identifier, as specified in 3GPP TS 23.003 clause 9.1.1 and 9.1.2. It shall be coded as string in which the labels are separated by dots (e.g. \"Label1.Label2.Label3\").
Dnn *string `json:"dnn,omitempty"`
Snssai *Snssai `json:"snssai,omitempty"`
EventInfo *EventInfo `json:"eventInfo,omitempty"`
}
type _AfNotification AfNotification
// NewAfNotification instantiates a new AfNotification 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 NewAfNotification(subscription string) *AfNotification {
this := AfNotification{}
return &this
}
// NewAfNotificationWithDefaults instantiates a new AfNotification 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 NewAfNotificationWithDefaults() *AfNotification {
this := AfNotification{}
return &this
}
// GetSubscription returns the Subscription field value
func (o *AfNotification) GetSubscription() string {
if o == nil {
var ret string
return ret
}
return o.Subscription
}
// GetSubscriptionOk returns a tuple with the Subscription field value
// and a boolean to check if the value has been set.
func (o *AfNotification) GetSubscriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Subscription, true
}
// SetSubscription sets field value
func (o *AfNotification) SetSubscription(v string) {
o.Subscription = v
}
// GetReportEvent returns the ReportEvent field value if set, zero value otherwise.
func (o *AfNotification) GetReportEvent() Event {
if o == nil || IsNil(o.ReportEvent) {
var ret Event
return ret
}
return *o.ReportEvent
}
// GetReportEventOk returns a tuple with the ReportEvent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AfNotification) GetReportEventOk() (*Event, bool) {
if o == nil || IsNil(o.ReportEvent) {
return nil, false
}
return o.ReportEvent, true
}
// HasReportEvent returns a boolean if a field has been set.
func (o *AfNotification) HasReportEvent() bool {
if o != nil && !IsNil(o.ReportEvent) {
return true
}
return false
}
// SetReportEvent gets a reference to the given Event and assigns it to the ReportEvent field.
func (o *AfNotification) SetReportEvent(v Event) {
o.ReportEvent = &v
}
// GetAuthResult returns the AuthResult field value if set, zero value otherwise.
func (o *AfNotification) GetAuthResult() AuthorizationResult {
if o == nil || IsNil(o.AuthResult) {
var ret AuthorizationResult
return ret
}
return *o.AuthResult
}
// GetAuthResultOk returns a tuple with the AuthResult field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AfNotification) GetAuthResultOk() (*AuthorizationResult, bool) {
if o == nil || IsNil(o.AuthResult) {
return nil, false
}
return o.AuthResult, true
}
// HasAuthResult returns a boolean if a field has been set.
func (o *AfNotification) HasAuthResult() bool {
if o != nil && !IsNil(o.AuthResult) {
return true
}
return false
}
// SetAuthResult gets a reference to the given AuthorizationResult and assigns it to the AuthResult field.
func (o *AfNotification) SetAuthResult(v AuthorizationResult) {
o.AuthResult = &v
}
// GetGpsis returns the Gpsis field value if set, zero value otherwise.
func (o *AfNotification) GetGpsis() []string {
if o == nil || IsNil(o.Gpsis) {
var ret []string
return ret
}
return o.Gpsis
}
// GetGpsisOk returns a tuple with the Gpsis field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AfNotification) GetGpsisOk() ([]string, bool) {
if o == nil || IsNil(o.Gpsis) {
return nil, false
}
return o.Gpsis, true
}
// HasGpsis returns a boolean if a field has been set.
func (o *AfNotification) HasGpsis() bool {
if o != nil && !IsNil(o.Gpsis) {
return true
}
return false
}
// SetGpsis gets a reference to the given []string and assigns it to the Gpsis field.
func (o *AfNotification) SetGpsis(v []string) {
o.Gpsis = v
}
// GetDnn returns the Dnn field value if set, zero value otherwise.
func (o *AfNotification) GetDnn() string {
if o == nil || IsNil(o.Dnn) {
var ret string
return ret
}
return *o.Dnn
}
// GetDnnOk returns a tuple with the Dnn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AfNotification) GetDnnOk() (*string, bool) {
if o == nil || IsNil(o.Dnn) {
return nil, false
}
return o.Dnn, true
}
// HasDnn returns a boolean if a field has been set.
func (o *AfNotification) HasDnn() bool {
if o != nil && !IsNil(o.Dnn) {
return true
}
return false
}
// SetDnn gets a reference to the given string and assigns it to the Dnn field.
func (o *AfNotification) SetDnn(v string) {
o.Dnn = &v
}
// GetSnssai returns the Snssai field value if set, zero value otherwise.
func (o *AfNotification) GetSnssai() Snssai {
if o == nil || IsNil(o.Snssai) {
var ret Snssai
return ret
}
return *o.Snssai
}
// GetSnssaiOk returns a tuple with the Snssai field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AfNotification) GetSnssaiOk() (*Snssai, bool) {
if o == nil || IsNil(o.Snssai) {
return nil, false
}
return o.Snssai, true
}
// HasSnssai returns a boolean if a field has been set.
func (o *AfNotification) HasSnssai() bool {
if o != nil && !IsNil(o.Snssai) {
return true
}
return false
}
// SetSnssai gets a reference to the given Snssai and assigns it to the Snssai field.
func (o *AfNotification) SetSnssai(v Snssai) {
o.Snssai = &v
}
// GetEventInfo returns the EventInfo field value if set, zero value otherwise.
func (o *AfNotification) GetEventInfo() EventInfo {
if o == nil || IsNil(o.EventInfo) {
var ret EventInfo
return ret
}
return *o.EventInfo
}
// GetEventInfoOk returns a tuple with the EventInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AfNotification) GetEventInfoOk() (*EventInfo, bool) {
if o == nil || IsNil(o.EventInfo) {
return nil, false
}
return o.EventInfo, true
}
// HasEventInfo returns a boolean if a field has been set.
func (o *AfNotification) HasEventInfo() bool {
if o != nil && !IsNil(o.EventInfo) {
return true
}
return false
}
// SetEventInfo gets a reference to the given EventInfo and assigns it to the EventInfo field.
func (o *AfNotification) SetEventInfo(v EventInfo) {
o.EventInfo = &v
}
func (o AfNotification) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AfNotification) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["subscription"] = o.Subscription
if !IsNil(o.ReportEvent) {
toSerialize["reportEvent"] = o.ReportEvent
}
if !IsNil(o.AuthResult) {
toSerialize["authResult"] = o.AuthResult
}
if !IsNil(o.Gpsis) {
toSerialize["gpsis"] = o.Gpsis
}
if !IsNil(o.Dnn) {
toSerialize["dnn"] = o.Dnn
}
if !IsNil(o.Snssai) {
toSerialize["snssai"] = o.Snssai
}
if !IsNil(o.EventInfo) {
toSerialize["eventInfo"] = o.EventInfo
}
return toSerialize, nil
}
func (o *AfNotification) 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{
"subscription",
}
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)
}
}
varAfNotification := _AfNotification{}
err = json.Unmarshal(bytes, &varAfNotification)
if err != nil {
return err
}
*o = AfNotification(varAfNotification)
return err
}
type NullableAfNotification struct {
value *AfNotification
isSet bool
}
func (v NullableAfNotification) Get() *AfNotification {
return v.value
}
func (v *NullableAfNotification) Set(val *AfNotification) {
v.value = val
v.isSet = true
}
func (v NullableAfNotification) IsSet() bool {
return v.isSet
}
func (v *NullableAfNotification) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAfNotification(val *AfNotification) *NullableAfNotification {
return &NullableAfNotification{value: val, isSet: true}
}
func (v NullableAfNotification) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAfNotification) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。