代码拉取完成,页面将自动刷新
/*
Naf_Authentication
AF Authentication Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Naf_Authentication
import (
"encoding/json"
"fmt"
)
// checks if the UAVAuthInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UAVAuthInfo{}
// UAVAuthInfo UAV auth data
type UAVAuthInfo struct {
// 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"`
ServiceLevelId string `json:"serviceLevelId"`
// String providing an URI formatted according to RFC 3986.
NotifyUri *string `json:"notifyUri,omitempty"`
NotifyCorrId *string `json:"notifyCorrId,omitempty"`
IpAddr NullableIpAddr `json:"ipAddr,omitempty"`
// String representing a Permanent Equipment Identifier that may contain - an IMEI or IMEISV, as specified in clause 6.2 of 3GPP TS 23.003; a MAC address for a 5G-RG or FN-RG via wireline access, with an indication that this address cannot be trusted for regulatory purpose if this address cannot be used as an Equipment Identifier of the FN-RG, as specified in clause 4.7.7 of 3GPP TS23.316. Examples are imei-012345678901234 or imeisv-0123456789012345.
Pei *string `json:"pei,omitempty"`
// Deprecated
AuthMsg *string `json:"authMsg,omitempty"`
AuthContainer []AuthContainer `json:"authContainer,omitempty"`
UavLocInfo *LocationArea5G `json:"uavLocInfo,omitempty"`
// A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
SuppFeat *string `json:"suppFeat,omitempty"`
}
type _UAVAuthInfo UAVAuthInfo
// NewUAVAuthInfo instantiates a new UAVAuthInfo 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 NewUAVAuthInfo(gpsi string, serviceLevelId string) *UAVAuthInfo {
this := UAVAuthInfo{}
this.Gpsi = gpsi
this.ServiceLevelId = serviceLevelId
return &this
}
// NewUAVAuthInfoWithDefaults instantiates a new UAVAuthInfo 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 NewUAVAuthInfoWithDefaults() *UAVAuthInfo {
this := UAVAuthInfo{}
return &this
}
// GetGpsi returns the Gpsi field value
func (o *UAVAuthInfo) GetGpsi() string {
if o == nil {
var ret string
return ret
}
return o.Gpsi
}
// GetGpsiOk returns a tuple with the Gpsi field value
// and a boolean to check if the value has been set.
func (o *UAVAuthInfo) GetGpsiOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Gpsi, true
}
// SetGpsi sets field value
func (o *UAVAuthInfo) SetGpsi(v string) {
o.Gpsi = v
}
// GetServiceLevelId returns the ServiceLevelId field value
func (o *UAVAuthInfo) GetServiceLevelId() string {
if o == nil {
var ret string
return ret
}
return o.ServiceLevelId
}
// GetServiceLevelIdOk returns a tuple with the ServiceLevelId field value
// and a boolean to check if the value has been set.
func (o *UAVAuthInfo) GetServiceLevelIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ServiceLevelId, true
}
// SetServiceLevelId sets field value
func (o *UAVAuthInfo) SetServiceLevelId(v string) {
o.ServiceLevelId = v
}
// GetNotifyUri returns the NotifyUri field value if set, zero value otherwise.
func (o *UAVAuthInfo) GetNotifyUri() string {
if o == nil || IsNil(o.NotifyUri) {
var ret string
return ret
}
return *o.NotifyUri
}
// GetNotifyUriOk returns a tuple with the NotifyUri field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UAVAuthInfo) GetNotifyUriOk() (*string, bool) {
if o == nil || IsNil(o.NotifyUri) {
return nil, false
}
return o.NotifyUri, true
}
// HasNotifyUri returns a boolean if a field has been set.
func (o *UAVAuthInfo) HasNotifyUri() bool {
if o != nil && !IsNil(o.NotifyUri) {
return true
}
return false
}
// SetNotifyUri gets a reference to the given string and assigns it to the NotifyUri field.
func (o *UAVAuthInfo) SetNotifyUri(v string) {
o.NotifyUri = &v
}
// GetNotifyCorrId returns the NotifyCorrId field value if set, zero value otherwise.
func (o *UAVAuthInfo) GetNotifyCorrId() string {
if o == nil || IsNil(o.NotifyCorrId) {
var ret string
return ret
}
return *o.NotifyCorrId
}
// GetNotifyCorrIdOk returns a tuple with the NotifyCorrId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UAVAuthInfo) GetNotifyCorrIdOk() (*string, bool) {
if o == nil || IsNil(o.NotifyCorrId) {
return nil, false
}
return o.NotifyCorrId, true
}
// HasNotifyCorrId returns a boolean if a field has been set.
func (o *UAVAuthInfo) HasNotifyCorrId() bool {
if o != nil && !IsNil(o.NotifyCorrId) {
return true
}
return false
}
// SetNotifyCorrId gets a reference to the given string and assigns it to the NotifyCorrId field.
func (o *UAVAuthInfo) SetNotifyCorrId(v string) {
o.NotifyCorrId = &v
}
// GetIpAddr returns the IpAddr field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UAVAuthInfo) GetIpAddr() IpAddr {
if o == nil || IsNil(o.IpAddr.Get()) {
var ret IpAddr
return ret
}
return *o.IpAddr.Get()
}
// GetIpAddrOk returns a tuple with the IpAddr 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 *UAVAuthInfo) GetIpAddrOk() (*IpAddr, bool) {
if o == nil {
return nil, false
}
return o.IpAddr.Get(), o.IpAddr.IsSet()
}
// HasIpAddr returns a boolean if a field has been set.
func (o *UAVAuthInfo) HasIpAddr() bool {
if o != nil && o.IpAddr.IsSet() {
return true
}
return false
}
// SetIpAddr gets a reference to the given NullableIpAddr and assigns it to the IpAddr field.
func (o *UAVAuthInfo) SetIpAddr(v IpAddr) {
o.IpAddr.Set(&v)
}
// SetIpAddrNil sets the value for IpAddr to be an explicit nil
func (o *UAVAuthInfo) SetIpAddrNil() {
o.IpAddr.Set(nil)
}
// UnsetIpAddr ensures that no value is present for IpAddr, not even an explicit nil
func (o *UAVAuthInfo) UnsetIpAddr() {
o.IpAddr.Unset()
}
// GetPei returns the Pei field value if set, zero value otherwise.
func (o *UAVAuthInfo) GetPei() string {
if o == nil || IsNil(o.Pei) {
var ret string
return ret
}
return *o.Pei
}
// GetPeiOk returns a tuple with the Pei field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UAVAuthInfo) GetPeiOk() (*string, bool) {
if o == nil || IsNil(o.Pei) {
return nil, false
}
return o.Pei, true
}
// HasPei returns a boolean if a field has been set.
func (o *UAVAuthInfo) HasPei() bool {
if o != nil && !IsNil(o.Pei) {
return true
}
return false
}
// SetPei gets a reference to the given string and assigns it to the Pei field.
func (o *UAVAuthInfo) SetPei(v string) {
o.Pei = &v
}
// GetAuthMsg returns the AuthMsg field value if set, zero value otherwise.
// Deprecated
func (o *UAVAuthInfo) GetAuthMsg() string {
if o == nil || IsNil(o.AuthMsg) {
var ret string
return ret
}
return *o.AuthMsg
}
// GetAuthMsgOk returns a tuple with the AuthMsg field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *UAVAuthInfo) GetAuthMsgOk() (*string, bool) {
if o == nil || IsNil(o.AuthMsg) {
return nil, false
}
return o.AuthMsg, true
}
// HasAuthMsg returns a boolean if a field has been set.
func (o *UAVAuthInfo) HasAuthMsg() bool {
if o != nil && !IsNil(o.AuthMsg) {
return true
}
return false
}
// SetAuthMsg gets a reference to the given string and assigns it to the AuthMsg field.
// Deprecated
func (o *UAVAuthInfo) SetAuthMsg(v string) {
o.AuthMsg = &v
}
// GetAuthContainer returns the AuthContainer field value if set, zero value otherwise.
func (o *UAVAuthInfo) GetAuthContainer() []AuthContainer {
if o == nil || IsNil(o.AuthContainer) {
var ret []AuthContainer
return ret
}
return o.AuthContainer
}
// GetAuthContainerOk returns a tuple with the AuthContainer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UAVAuthInfo) GetAuthContainerOk() ([]AuthContainer, bool) {
if o == nil || IsNil(o.AuthContainer) {
return nil, false
}
return o.AuthContainer, true
}
// HasAuthContainer returns a boolean if a field has been set.
func (o *UAVAuthInfo) HasAuthContainer() bool {
if o != nil && !IsNil(o.AuthContainer) {
return true
}
return false
}
// SetAuthContainer gets a reference to the given []AuthContainer and assigns it to the AuthContainer field.
func (o *UAVAuthInfo) SetAuthContainer(v []AuthContainer) {
o.AuthContainer = v
}
// GetUavLocInfo returns the UavLocInfo field value if set, zero value otherwise.
func (o *UAVAuthInfo) GetUavLocInfo() LocationArea5G {
if o == nil || IsNil(o.UavLocInfo) {
var ret LocationArea5G
return ret
}
return *o.UavLocInfo
}
// GetUavLocInfoOk returns a tuple with the UavLocInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UAVAuthInfo) GetUavLocInfoOk() (*LocationArea5G, bool) {
if o == nil || IsNil(o.UavLocInfo) {
return nil, false
}
return o.UavLocInfo, true
}
// HasUavLocInfo returns a boolean if a field has been set.
func (o *UAVAuthInfo) HasUavLocInfo() bool {
if o != nil && !IsNil(o.UavLocInfo) {
return true
}
return false
}
// SetUavLocInfo gets a reference to the given LocationArea5G and assigns it to the UavLocInfo field.
func (o *UAVAuthInfo) SetUavLocInfo(v LocationArea5G) {
o.UavLocInfo = &v
}
// GetSuppFeat returns the SuppFeat field value if set, zero value otherwise.
func (o *UAVAuthInfo) GetSuppFeat() string {
if o == nil || IsNil(o.SuppFeat) {
var ret string
return ret
}
return *o.SuppFeat
}
// GetSuppFeatOk returns a tuple with the SuppFeat field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UAVAuthInfo) GetSuppFeatOk() (*string, bool) {
if o == nil || IsNil(o.SuppFeat) {
return nil, false
}
return o.SuppFeat, true
}
// HasSuppFeat returns a boolean if a field has been set.
func (o *UAVAuthInfo) HasSuppFeat() bool {
if o != nil && !IsNil(o.SuppFeat) {
return true
}
return false
}
// SetSuppFeat gets a reference to the given string and assigns it to the SuppFeat field.
func (o *UAVAuthInfo) SetSuppFeat(v string) {
o.SuppFeat = &v
}
func (o UAVAuthInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UAVAuthInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["gpsi"] = o.Gpsi
toSerialize["serviceLevelId"] = o.ServiceLevelId
if !IsNil(o.NotifyUri) {
toSerialize["notifyUri"] = o.NotifyUri
}
if !IsNil(o.NotifyCorrId) {
toSerialize["notifyCorrId"] = o.NotifyCorrId
}
if o.IpAddr.IsSet() {
toSerialize["ipAddr"] = o.IpAddr.Get()
}
if !IsNil(o.Pei) {
toSerialize["pei"] = o.Pei
}
if !IsNil(o.AuthMsg) {
toSerialize["authMsg"] = o.AuthMsg
}
if !IsNil(o.AuthContainer) {
toSerialize["authContainer"] = o.AuthContainer
}
if !IsNil(o.UavLocInfo) {
toSerialize["uavLocInfo"] = o.UavLocInfo
}
if !IsNil(o.SuppFeat) {
toSerialize["suppFeat"] = o.SuppFeat
}
return toSerialize, nil
}
func (o *UAVAuthInfo) 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{
"gpsi",
"serviceLevelId",
}
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)
}
}
varUAVAuthInfo := _UAVAuthInfo{}
err = json.Unmarshal(bytes, &varUAVAuthInfo)
if err != nil {
return err
}
*o = UAVAuthInfo(varUAVAuthInfo)
return err
}
type NullableUAVAuthInfo struct {
value *UAVAuthInfo
isSet bool
}
func (v NullableUAVAuthInfo) Get() *UAVAuthInfo {
return v.value
}
func (v *NullableUAVAuthInfo) Set(val *UAVAuthInfo) {
v.value = val
v.isSet = true
}
func (v NullableUAVAuthInfo) IsSet() bool {
return v.isSet
}
func (v *NullableUAVAuthInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUAVAuthInfo(val *UAVAuthInfo) *NullableUAVAuthInfo {
return &NullableUAVAuthInfo{value: val, isSet: true}
}
func (v NullableUAVAuthInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUAVAuthInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。