1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_access_token_req.go 24.64 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
/*
Nrouter_SMService Service API
SMS Router SMService. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nrouter_SMService
import (
"encoding/json"
"fmt"
)
// checks if the AccessTokenReq type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AccessTokenReq{}
// AccessTokenReq Contains information related to the access token request
type AccessTokenReq struct {
GrantType string `json:"grant_type"`
// String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122.
NfInstanceId string `json:"nfInstanceId"`
NfType *NFType `json:"nfType,omitempty"`
TargetNfType *NFType `json:"targetNfType,omitempty"`
Scope string `json:"scope"`
// String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122.
TargetNfInstanceId *string `json:"targetNfInstanceId,omitempty"`
RequesterPlmn *PlmnId `json:"requesterPlmn,omitempty"`
RequesterPlmnList []PlmnId `json:"requesterPlmnList,omitempty"`
RequesterSnssaiList []Snssai `json:"requesterSnssaiList,omitempty"`
// Fully Qualified Domain Name
RequesterFqdn *string `json:"requesterFqdn,omitempty"`
RequesterSnpnList []PlmnIdNid `json:"requesterSnpnList,omitempty"`
TargetPlmn *PlmnId `json:"targetPlmn,omitempty"`
TargetSnpn *PlmnIdNid `json:"targetSnpn,omitempty"`
TargetSnssaiList []Snssai `json:"targetSnssaiList,omitempty"`
TargetNsiList []string `json:"targetNsiList,omitempty"`
// NF Set Identifier (see clause 28.12 of 3GPP TS 23.003), formatted as the following string \"set<Set ID>.<nftype>set.5gc.mnc<MNC>.mcc<MCC>\", or \"set<SetID>.<NFType>set.5gc.nid<NID>.mnc<MNC>.mcc<MCC>\" with <MCC> encoded as defined in clause 5.4.2 (\"Mcc\" data type definition) <MNC> encoding the Mobile Network Code part of the PLMN, comprising 3 digits. If there are only 2 significant digits in the MNC, one \"0\" digit shall be inserted at the left side to fill the 3 digits coding of MNC. Pattern: '^[0-9]{3}$' <NFType> encoded as a value defined in Table 6.1.6.3.3-1 of 3GPP TS 29.510 but with lower case characters <Set ID> encoded as a string of characters consisting of alphabetic characters (A-Z and a-z), digits (0-9) and/or the hyphen (-) and that shall end with either an alphabetic character or a digit.
TargetNfSetId *string `json:"targetNfSetId,omitempty"`
// NF Service Set Identifier (see clause 28.12 of 3GPP TS 23.003) formatted as the following string \"set<Set ID>.sn<Service Name>.nfi<NF Instance ID>.5gc.mnc<MNC>.mcc<MCC>\", or \"set<SetID>.sn<ServiceName>.nfi<NFInstanceID>.5gc.nid<NID>.mnc<MNC>.mcc<MCC>\" with <MCC> encoded as defined in clause 5.4.2 (\"Mcc\" data type definition) <MNC> encoding the Mobile Network Code part of the PLMN, comprising 3 digits. If there are only 2 significant digits in the MNC, one \"0\" digit shall be inserted at the left side to fill the 3 digits coding of MNC. Pattern: '^[0-9]{3}$' <NID> encoded as defined in clause 5.4.2 (\"Nid\" data type definition) <NFInstanceId> encoded as defined in clause 5.3.2 <ServiceName> encoded as defined in 3GPP TS 29.510 <Set ID> encoded as a string of characters consisting of alphabetic characters (A-Z and a-z), digits (0-9) and/or the hyphen (-) and that shall end with either an alphabetic character or a digit.
TargetNfServiceSetId *string `json:"targetNfServiceSetId,omitempty"`
// String providing an URI formatted according to RFC 3986.
HnrfAccessTokenUri *string `json:"hnrfAccessTokenUri,omitempty"`
// String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122.
SourceNfInstanceId *string `json:"sourceNfInstanceId,omitempty"`
}
type _AccessTokenReq AccessTokenReq
// NewAccessTokenReq instantiates a new AccessTokenReq 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 NewAccessTokenReq(grantType string, nfInstanceId string, scope string) *AccessTokenReq {
this := AccessTokenReq{}
this.GrantType = grantType
this.NfInstanceId = nfInstanceId
this.Scope = scope
return &this
}
// NewAccessTokenReqWithDefaults instantiates a new AccessTokenReq 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 NewAccessTokenReqWithDefaults() *AccessTokenReq {
this := AccessTokenReq{}
return &this
}
// GetGrantType returns the GrantType field value
func (o *AccessTokenReq) GetGrantType() string {
if o == nil {
var ret string
return ret
}
return o.GrantType
}
// GetGrantTypeOk returns a tuple with the GrantType field value
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetGrantTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.GrantType, true
}
// SetGrantType sets field value
func (o *AccessTokenReq) SetGrantType(v string) {
o.GrantType = v
}
// GetNfInstanceId returns the NfInstanceId field value
func (o *AccessTokenReq) GetNfInstanceId() string {
if o == nil {
var ret string
return ret
}
return o.NfInstanceId
}
// GetNfInstanceIdOk returns a tuple with the NfInstanceId field value
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetNfInstanceIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NfInstanceId, true
}
// SetNfInstanceId sets field value
func (o *AccessTokenReq) SetNfInstanceId(v string) {
o.NfInstanceId = v
}
// GetNfType returns the NfType field value if set, zero value otherwise.
func (o *AccessTokenReq) GetNfType() NFType {
if o == nil || IsNil(o.NfType) {
var ret NFType
return ret
}
return *o.NfType
}
// GetNfTypeOk returns a tuple with the NfType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetNfTypeOk() (*NFType, bool) {
if o == nil || IsNil(o.NfType) {
return nil, false
}
return o.NfType, true
}
// HasNfType returns a boolean if a field has been set.
func (o *AccessTokenReq) HasNfType() bool {
if o != nil && !IsNil(o.NfType) {
return true
}
return false
}
// SetNfType gets a reference to the given NFType and assigns it to the NfType field.
func (o *AccessTokenReq) SetNfType(v NFType) {
o.NfType = &v
}
// GetTargetNfType returns the TargetNfType field value if set, zero value otherwise.
func (o *AccessTokenReq) GetTargetNfType() NFType {
if o == nil || IsNil(o.TargetNfType) {
var ret NFType
return ret
}
return *o.TargetNfType
}
// GetTargetNfTypeOk returns a tuple with the TargetNfType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetTargetNfTypeOk() (*NFType, bool) {
if o == nil || IsNil(o.TargetNfType) {
return nil, false
}
return o.TargetNfType, true
}
// HasTargetNfType returns a boolean if a field has been set.
func (o *AccessTokenReq) HasTargetNfType() bool {
if o != nil && !IsNil(o.TargetNfType) {
return true
}
return false
}
// SetTargetNfType gets a reference to the given NFType and assigns it to the TargetNfType field.
func (o *AccessTokenReq) SetTargetNfType(v NFType) {
o.TargetNfType = &v
}
// GetScope returns the Scope field value
func (o *AccessTokenReq) GetScope() string {
if o == nil {
var ret string
return ret
}
return o.Scope
}
// GetScopeOk returns a tuple with the Scope field value
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetScopeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Scope, true
}
// SetScope sets field value
func (o *AccessTokenReq) SetScope(v string) {
o.Scope = v
}
// GetTargetNfInstanceId returns the TargetNfInstanceId field value if set, zero value otherwise.
func (o *AccessTokenReq) GetTargetNfInstanceId() string {
if o == nil || IsNil(o.TargetNfInstanceId) {
var ret string
return ret
}
return *o.TargetNfInstanceId
}
// GetTargetNfInstanceIdOk returns a tuple with the TargetNfInstanceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetTargetNfInstanceIdOk() (*string, bool) {
if o == nil || IsNil(o.TargetNfInstanceId) {
return nil, false
}
return o.TargetNfInstanceId, true
}
// HasTargetNfInstanceId returns a boolean if a field has been set.
func (o *AccessTokenReq) HasTargetNfInstanceId() bool {
if o != nil && !IsNil(o.TargetNfInstanceId) {
return true
}
return false
}
// SetTargetNfInstanceId gets a reference to the given string and assigns it to the TargetNfInstanceId field.
func (o *AccessTokenReq) SetTargetNfInstanceId(v string) {
o.TargetNfInstanceId = &v
}
// GetRequesterPlmn returns the RequesterPlmn field value if set, zero value otherwise.
func (o *AccessTokenReq) GetRequesterPlmn() PlmnId {
if o == nil || IsNil(o.RequesterPlmn) {
var ret PlmnId
return ret
}
return *o.RequesterPlmn
}
// GetRequesterPlmnOk returns a tuple with the RequesterPlmn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetRequesterPlmnOk() (*PlmnId, bool) {
if o == nil || IsNil(o.RequesterPlmn) {
return nil, false
}
return o.RequesterPlmn, true
}
// HasRequesterPlmn returns a boolean if a field has been set.
func (o *AccessTokenReq) HasRequesterPlmn() bool {
if o != nil && !IsNil(o.RequesterPlmn) {
return true
}
return false
}
// SetRequesterPlmn gets a reference to the given PlmnId and assigns it to the RequesterPlmn field.
func (o *AccessTokenReq) SetRequesterPlmn(v PlmnId) {
o.RequesterPlmn = &v
}
// GetRequesterPlmnList returns the RequesterPlmnList field value if set, zero value otherwise.
func (o *AccessTokenReq) GetRequesterPlmnList() []PlmnId {
if o == nil || IsNil(o.RequesterPlmnList) {
var ret []PlmnId
return ret
}
return o.RequesterPlmnList
}
// GetRequesterPlmnListOk returns a tuple with the RequesterPlmnList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetRequesterPlmnListOk() ([]PlmnId, bool) {
if o == nil || IsNil(o.RequesterPlmnList) {
return nil, false
}
return o.RequesterPlmnList, true
}
// HasRequesterPlmnList returns a boolean if a field has been set.
func (o *AccessTokenReq) HasRequesterPlmnList() bool {
if o != nil && !IsNil(o.RequesterPlmnList) {
return true
}
return false
}
// SetRequesterPlmnList gets a reference to the given []PlmnId and assigns it to the RequesterPlmnList field.
func (o *AccessTokenReq) SetRequesterPlmnList(v []PlmnId) {
o.RequesterPlmnList = v
}
// GetRequesterSnssaiList returns the RequesterSnssaiList field value if set, zero value otherwise.
func (o *AccessTokenReq) GetRequesterSnssaiList() []Snssai {
if o == nil || IsNil(o.RequesterSnssaiList) {
var ret []Snssai
return ret
}
return o.RequesterSnssaiList
}
// GetRequesterSnssaiListOk returns a tuple with the RequesterSnssaiList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetRequesterSnssaiListOk() ([]Snssai, bool) {
if o == nil || IsNil(o.RequesterSnssaiList) {
return nil, false
}
return o.RequesterSnssaiList, true
}
// HasRequesterSnssaiList returns a boolean if a field has been set.
func (o *AccessTokenReq) HasRequesterSnssaiList() bool {
if o != nil && !IsNil(o.RequesterSnssaiList) {
return true
}
return false
}
// SetRequesterSnssaiList gets a reference to the given []Snssai and assigns it to the RequesterSnssaiList field.
func (o *AccessTokenReq) SetRequesterSnssaiList(v []Snssai) {
o.RequesterSnssaiList = v
}
// GetRequesterFqdn returns the RequesterFqdn field value if set, zero value otherwise.
func (o *AccessTokenReq) GetRequesterFqdn() string {
if o == nil || IsNil(o.RequesterFqdn) {
var ret string
return ret
}
return *o.RequesterFqdn
}
// GetRequesterFqdnOk returns a tuple with the RequesterFqdn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetRequesterFqdnOk() (*string, bool) {
if o == nil || IsNil(o.RequesterFqdn) {
return nil, false
}
return o.RequesterFqdn, true
}
// HasRequesterFqdn returns a boolean if a field has been set.
func (o *AccessTokenReq) HasRequesterFqdn() bool {
if o != nil && !IsNil(o.RequesterFqdn) {
return true
}
return false
}
// SetRequesterFqdn gets a reference to the given string and assigns it to the RequesterFqdn field.
func (o *AccessTokenReq) SetRequesterFqdn(v string) {
o.RequesterFqdn = &v
}
// GetRequesterSnpnList returns the RequesterSnpnList field value if set, zero value otherwise.
func (o *AccessTokenReq) GetRequesterSnpnList() []PlmnIdNid {
if o == nil || IsNil(o.RequesterSnpnList) {
var ret []PlmnIdNid
return ret
}
return o.RequesterSnpnList
}
// GetRequesterSnpnListOk returns a tuple with the RequesterSnpnList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetRequesterSnpnListOk() ([]PlmnIdNid, bool) {
if o == nil || IsNil(o.RequesterSnpnList) {
return nil, false
}
return o.RequesterSnpnList, true
}
// HasRequesterSnpnList returns a boolean if a field has been set.
func (o *AccessTokenReq) HasRequesterSnpnList() bool {
if o != nil && !IsNil(o.RequesterSnpnList) {
return true
}
return false
}
// SetRequesterSnpnList gets a reference to the given []PlmnIdNid and assigns it to the RequesterSnpnList field.
func (o *AccessTokenReq) SetRequesterSnpnList(v []PlmnIdNid) {
o.RequesterSnpnList = v
}
// GetTargetPlmn returns the TargetPlmn field value if set, zero value otherwise.
func (o *AccessTokenReq) GetTargetPlmn() PlmnId {
if o == nil || IsNil(o.TargetPlmn) {
var ret PlmnId
return ret
}
return *o.TargetPlmn
}
// GetTargetPlmnOk returns a tuple with the TargetPlmn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetTargetPlmnOk() (*PlmnId, bool) {
if o == nil || IsNil(o.TargetPlmn) {
return nil, false
}
return o.TargetPlmn, true
}
// HasTargetPlmn returns a boolean if a field has been set.
func (o *AccessTokenReq) HasTargetPlmn() bool {
if o != nil && !IsNil(o.TargetPlmn) {
return true
}
return false
}
// SetTargetPlmn gets a reference to the given PlmnId and assigns it to the TargetPlmn field.
func (o *AccessTokenReq) SetTargetPlmn(v PlmnId) {
o.TargetPlmn = &v
}
// GetTargetSnpn returns the TargetSnpn field value if set, zero value otherwise.
func (o *AccessTokenReq) GetTargetSnpn() PlmnIdNid {
if o == nil || IsNil(o.TargetSnpn) {
var ret PlmnIdNid
return ret
}
return *o.TargetSnpn
}
// GetTargetSnpnOk returns a tuple with the TargetSnpn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetTargetSnpnOk() (*PlmnIdNid, bool) {
if o == nil || IsNil(o.TargetSnpn) {
return nil, false
}
return o.TargetSnpn, true
}
// HasTargetSnpn returns a boolean if a field has been set.
func (o *AccessTokenReq) HasTargetSnpn() bool {
if o != nil && !IsNil(o.TargetSnpn) {
return true
}
return false
}
// SetTargetSnpn gets a reference to the given PlmnIdNid and assigns it to the TargetSnpn field.
func (o *AccessTokenReq) SetTargetSnpn(v PlmnIdNid) {
o.TargetSnpn = &v
}
// GetTargetSnssaiList returns the TargetSnssaiList field value if set, zero value otherwise.
func (o *AccessTokenReq) GetTargetSnssaiList() []Snssai {
if o == nil || IsNil(o.TargetSnssaiList) {
var ret []Snssai
return ret
}
return o.TargetSnssaiList
}
// GetTargetSnssaiListOk returns a tuple with the TargetSnssaiList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetTargetSnssaiListOk() ([]Snssai, bool) {
if o == nil || IsNil(o.TargetSnssaiList) {
return nil, false
}
return o.TargetSnssaiList, true
}
// HasTargetSnssaiList returns a boolean if a field has been set.
func (o *AccessTokenReq) HasTargetSnssaiList() bool {
if o != nil && !IsNil(o.TargetSnssaiList) {
return true
}
return false
}
// SetTargetSnssaiList gets a reference to the given []Snssai and assigns it to the TargetSnssaiList field.
func (o *AccessTokenReq) SetTargetSnssaiList(v []Snssai) {
o.TargetSnssaiList = v
}
// GetTargetNsiList returns the TargetNsiList field value if set, zero value otherwise.
func (o *AccessTokenReq) GetTargetNsiList() []string {
if o == nil || IsNil(o.TargetNsiList) {
var ret []string
return ret
}
return o.TargetNsiList
}
// GetTargetNsiListOk returns a tuple with the TargetNsiList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetTargetNsiListOk() ([]string, bool) {
if o == nil || IsNil(o.TargetNsiList) {
return nil, false
}
return o.TargetNsiList, true
}
// HasTargetNsiList returns a boolean if a field has been set.
func (o *AccessTokenReq) HasTargetNsiList() bool {
if o != nil && !IsNil(o.TargetNsiList) {
return true
}
return false
}
// SetTargetNsiList gets a reference to the given []string and assigns it to the TargetNsiList field.
func (o *AccessTokenReq) SetTargetNsiList(v []string) {
o.TargetNsiList = v
}
// GetTargetNfSetId returns the TargetNfSetId field value if set, zero value otherwise.
func (o *AccessTokenReq) GetTargetNfSetId() string {
if o == nil || IsNil(o.TargetNfSetId) {
var ret string
return ret
}
return *o.TargetNfSetId
}
// GetTargetNfSetIdOk returns a tuple with the TargetNfSetId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetTargetNfSetIdOk() (*string, bool) {
if o == nil || IsNil(o.TargetNfSetId) {
return nil, false
}
return o.TargetNfSetId, true
}
// HasTargetNfSetId returns a boolean if a field has been set.
func (o *AccessTokenReq) HasTargetNfSetId() bool {
if o != nil && !IsNil(o.TargetNfSetId) {
return true
}
return false
}
// SetTargetNfSetId gets a reference to the given string and assigns it to the TargetNfSetId field.
func (o *AccessTokenReq) SetTargetNfSetId(v string) {
o.TargetNfSetId = &v
}
// GetTargetNfServiceSetId returns the TargetNfServiceSetId field value if set, zero value otherwise.
func (o *AccessTokenReq) GetTargetNfServiceSetId() string {
if o == nil || IsNil(o.TargetNfServiceSetId) {
var ret string
return ret
}
return *o.TargetNfServiceSetId
}
// GetTargetNfServiceSetIdOk returns a tuple with the TargetNfServiceSetId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetTargetNfServiceSetIdOk() (*string, bool) {
if o == nil || IsNil(o.TargetNfServiceSetId) {
return nil, false
}
return o.TargetNfServiceSetId, true
}
// HasTargetNfServiceSetId returns a boolean if a field has been set.
func (o *AccessTokenReq) HasTargetNfServiceSetId() bool {
if o != nil && !IsNil(o.TargetNfServiceSetId) {
return true
}
return false
}
// SetTargetNfServiceSetId gets a reference to the given string and assigns it to the TargetNfServiceSetId field.
func (o *AccessTokenReq) SetTargetNfServiceSetId(v string) {
o.TargetNfServiceSetId = &v
}
// GetHnrfAccessTokenUri returns the HnrfAccessTokenUri field value if set, zero value otherwise.
func (o *AccessTokenReq) GetHnrfAccessTokenUri() string {
if o == nil || IsNil(o.HnrfAccessTokenUri) {
var ret string
return ret
}
return *o.HnrfAccessTokenUri
}
// GetHnrfAccessTokenUriOk returns a tuple with the HnrfAccessTokenUri field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetHnrfAccessTokenUriOk() (*string, bool) {
if o == nil || IsNil(o.HnrfAccessTokenUri) {
return nil, false
}
return o.HnrfAccessTokenUri, true
}
// HasHnrfAccessTokenUri returns a boolean if a field has been set.
func (o *AccessTokenReq) HasHnrfAccessTokenUri() bool {
if o != nil && !IsNil(o.HnrfAccessTokenUri) {
return true
}
return false
}
// SetHnrfAccessTokenUri gets a reference to the given string and assigns it to the HnrfAccessTokenUri field.
func (o *AccessTokenReq) SetHnrfAccessTokenUri(v string) {
o.HnrfAccessTokenUri = &v
}
// GetSourceNfInstanceId returns the SourceNfInstanceId field value if set, zero value otherwise.
func (o *AccessTokenReq) GetSourceNfInstanceId() string {
if o == nil || IsNil(o.SourceNfInstanceId) {
var ret string
return ret
}
return *o.SourceNfInstanceId
}
// GetSourceNfInstanceIdOk returns a tuple with the SourceNfInstanceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccessTokenReq) GetSourceNfInstanceIdOk() (*string, bool) {
if o == nil || IsNil(o.SourceNfInstanceId) {
return nil, false
}
return o.SourceNfInstanceId, true
}
// HasSourceNfInstanceId returns a boolean if a field has been set.
func (o *AccessTokenReq) HasSourceNfInstanceId() bool {
if o != nil && !IsNil(o.SourceNfInstanceId) {
return true
}
return false
}
// SetSourceNfInstanceId gets a reference to the given string and assigns it to the SourceNfInstanceId field.
func (o *AccessTokenReq) SetSourceNfInstanceId(v string) {
o.SourceNfInstanceId = &v
}
func (o AccessTokenReq) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AccessTokenReq) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["grant_type"] = o.GrantType
toSerialize["nfInstanceId"] = o.NfInstanceId
if !IsNil(o.NfType) {
toSerialize["nfType"] = o.NfType
}
if !IsNil(o.TargetNfType) {
toSerialize["targetNfType"] = o.TargetNfType
}
toSerialize["scope"] = o.Scope
if !IsNil(o.TargetNfInstanceId) {
toSerialize["targetNfInstanceId"] = o.TargetNfInstanceId
}
if !IsNil(o.RequesterPlmn) {
toSerialize["requesterPlmn"] = o.RequesterPlmn
}
if !IsNil(o.RequesterPlmnList) {
toSerialize["requesterPlmnList"] = o.RequesterPlmnList
}
if !IsNil(o.RequesterSnssaiList) {
toSerialize["requesterSnssaiList"] = o.RequesterSnssaiList
}
if !IsNil(o.RequesterFqdn) {
toSerialize["requesterFqdn"] = o.RequesterFqdn
}
if !IsNil(o.RequesterSnpnList) {
toSerialize["requesterSnpnList"] = o.RequesterSnpnList
}
if !IsNil(o.TargetPlmn) {
toSerialize["targetPlmn"] = o.TargetPlmn
}
if !IsNil(o.TargetSnpn) {
toSerialize["targetSnpn"] = o.TargetSnpn
}
if !IsNil(o.TargetSnssaiList) {
toSerialize["targetSnssaiList"] = o.TargetSnssaiList
}
if !IsNil(o.TargetNsiList) {
toSerialize["targetNsiList"] = o.TargetNsiList
}
if !IsNil(o.TargetNfSetId) {
toSerialize["targetNfSetId"] = o.TargetNfSetId
}
if !IsNil(o.TargetNfServiceSetId) {
toSerialize["targetNfServiceSetId"] = o.TargetNfServiceSetId
}
if !IsNil(o.HnrfAccessTokenUri) {
toSerialize["hnrfAccessTokenUri"] = o.HnrfAccessTokenUri
}
if !IsNil(o.SourceNfInstanceId) {
toSerialize["sourceNfInstanceId"] = o.SourceNfInstanceId
}
return toSerialize, nil
}
func (o *AccessTokenReq) 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{
"grant_type",
"nfInstanceId",
"scope",
}
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)
}
}
varAccessTokenReq := _AccessTokenReq{}
err = json.Unmarshal(bytes, &varAccessTokenReq)
if err != nil {
return err
}
*o = AccessTokenReq(varAccessTokenReq)
return err
}
type NullableAccessTokenReq struct {
value *AccessTokenReq
isSet bool
}
func (v NullableAccessTokenReq) Get() *AccessTokenReq {
return v.value
}
func (v *NullableAccessTokenReq) Set(val *AccessTokenReq) {
v.value = val
v.isSet = true
}
func (v NullableAccessTokenReq) IsSet() bool {
return v.isSet
}
func (v *NullableAccessTokenReq) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAccessTokenReq(val *AccessTokenReq) *NullableAccessTokenReq {
return &NullableAccessTokenReq{value: val, isSet: true}
}
func (v NullableAccessTokenReq) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAccessTokenReq) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助