代码拉取完成,页面将自动刷新
/*
NRF NFDiscovery Service
NRF NFDiscovery Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nnrf_NFDiscovery
import (
"encoding/json"
"fmt"
)
// checks if the SearchResult type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SearchResult{}
// SearchResult Contains the list of NF Profiles returned in a Discovery response
type SearchResult struct {
ValidityPeriod *int32 `json:"validityPeriod,omitempty"`
NfInstances []NFProfile `json:"nfInstances"`
SearchId *string `json:"searchId,omitempty"`
// Integer where the allowed values correspond to the value range of an unsigned 32-bit integer.
NumNfInstComplete *int32 `json:"numNfInstComplete,omitempty"`
PreferredSearch *PreferredSearch `json:"preferredSearch,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.
NrfSupportedFeatures *string `json:"nrfSupportedFeatures,omitempty"`
// List of matching NF instances. The key of the map is the NF instance ID.
NfInstanceList *map[string]NfInstanceInfo `json:"nfInstanceList,omitempty"`
AlteredPriorityInd *bool `json:"alteredPriorityInd,omitempty"`
NoProfileMatchInfo *NoProfileMatchInfo `json:"noProfileMatchInfo,omitempty"`
}
type _SearchResult SearchResult
// NewSearchResult instantiates a new SearchResult 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 NewSearchResult(nfInstances []NFProfile) *SearchResult {
this := SearchResult{}
this.NfInstances = nfInstances
return &this
}
// NewSearchResultWithDefaults instantiates a new SearchResult 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 NewSearchResultWithDefaults() *SearchResult {
this := SearchResult{}
return &this
}
// GetValidityPeriod returns the ValidityPeriod field value if set, zero value otherwise.
func (o *SearchResult) GetValidityPeriod() int32 {
if o == nil || IsNil(o.ValidityPeriod) {
var ret int32
return ret
}
return *o.ValidityPeriod
}
// GetValidityPeriodOk returns a tuple with the ValidityPeriod field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResult) GetValidityPeriodOk() (*int32, bool) {
if o == nil || IsNil(o.ValidityPeriod) {
return nil, false
}
return o.ValidityPeriod, true
}
// HasValidityPeriod returns a boolean if a field has been set.
func (o *SearchResult) HasValidityPeriod() bool {
if o != nil && !IsNil(o.ValidityPeriod) {
return true
}
return false
}
// SetValidityPeriod gets a reference to the given int32 and assigns it to the ValidityPeriod field.
func (o *SearchResult) SetValidityPeriod(v int32) {
o.ValidityPeriod = &v
}
// GetNfInstances returns the NfInstances field value
func (o *SearchResult) GetNfInstances() []NFProfile {
if o == nil {
var ret []NFProfile
return ret
}
return o.NfInstances
}
// GetNfInstancesOk returns a tuple with the NfInstances field value
// and a boolean to check if the value has been set.
func (o *SearchResult) GetNfInstancesOk() ([]NFProfile, bool) {
if o == nil {
return nil, false
}
return o.NfInstances, true
}
// SetNfInstances sets field value
func (o *SearchResult) SetNfInstances(v []NFProfile) {
o.NfInstances = v
}
// GetSearchId returns the SearchId field value if set, zero value otherwise.
func (o *SearchResult) GetSearchId() string {
if o == nil || IsNil(o.SearchId) {
var ret string
return ret
}
return *o.SearchId
}
// GetSearchIdOk returns a tuple with the SearchId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResult) GetSearchIdOk() (*string, bool) {
if o == nil || IsNil(o.SearchId) {
return nil, false
}
return o.SearchId, true
}
// HasSearchId returns a boolean if a field has been set.
func (o *SearchResult) HasSearchId() bool {
if o != nil && !IsNil(o.SearchId) {
return true
}
return false
}
// SetSearchId gets a reference to the given string and assigns it to the SearchId field.
func (o *SearchResult) SetSearchId(v string) {
o.SearchId = &v
}
// GetNumNfInstComplete returns the NumNfInstComplete field value if set, zero value otherwise.
func (o *SearchResult) GetNumNfInstComplete() int32 {
if o == nil || IsNil(o.NumNfInstComplete) {
var ret int32
return ret
}
return *o.NumNfInstComplete
}
// GetNumNfInstCompleteOk returns a tuple with the NumNfInstComplete field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResult) GetNumNfInstCompleteOk() (*int32, bool) {
if o == nil || IsNil(o.NumNfInstComplete) {
return nil, false
}
return o.NumNfInstComplete, true
}
// HasNumNfInstComplete returns a boolean if a field has been set.
func (o *SearchResult) HasNumNfInstComplete() bool {
if o != nil && !IsNil(o.NumNfInstComplete) {
return true
}
return false
}
// SetNumNfInstComplete gets a reference to the given int32 and assigns it to the NumNfInstComplete field.
func (o *SearchResult) SetNumNfInstComplete(v int32) {
o.NumNfInstComplete = &v
}
// GetPreferredSearch returns the PreferredSearch field value if set, zero value otherwise.
func (o *SearchResult) GetPreferredSearch() PreferredSearch {
if o == nil || IsNil(o.PreferredSearch) {
var ret PreferredSearch
return ret
}
return *o.PreferredSearch
}
// GetPreferredSearchOk returns a tuple with the PreferredSearch field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResult) GetPreferredSearchOk() (*PreferredSearch, bool) {
if o == nil || IsNil(o.PreferredSearch) {
return nil, false
}
return o.PreferredSearch, true
}
// HasPreferredSearch returns a boolean if a field has been set.
func (o *SearchResult) HasPreferredSearch() bool {
if o != nil && !IsNil(o.PreferredSearch) {
return true
}
return false
}
// SetPreferredSearch gets a reference to the given PreferredSearch and assigns it to the PreferredSearch field.
func (o *SearchResult) SetPreferredSearch(v PreferredSearch) {
o.PreferredSearch = &v
}
// GetNrfSupportedFeatures returns the NrfSupportedFeatures field value if set, zero value otherwise.
func (o *SearchResult) GetNrfSupportedFeatures() string {
if o == nil || IsNil(o.NrfSupportedFeatures) {
var ret string
return ret
}
return *o.NrfSupportedFeatures
}
// GetNrfSupportedFeaturesOk returns a tuple with the NrfSupportedFeatures field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResult) GetNrfSupportedFeaturesOk() (*string, bool) {
if o == nil || IsNil(o.NrfSupportedFeatures) {
return nil, false
}
return o.NrfSupportedFeatures, true
}
// HasNrfSupportedFeatures returns a boolean if a field has been set.
func (o *SearchResult) HasNrfSupportedFeatures() bool {
if o != nil && !IsNil(o.NrfSupportedFeatures) {
return true
}
return false
}
// SetNrfSupportedFeatures gets a reference to the given string and assigns it to the NrfSupportedFeatures field.
func (o *SearchResult) SetNrfSupportedFeatures(v string) {
o.NrfSupportedFeatures = &v
}
// GetNfInstanceList returns the NfInstanceList field value if set, zero value otherwise.
func (o *SearchResult) GetNfInstanceList() map[string]NfInstanceInfo {
if o == nil || IsNil(o.NfInstanceList) {
var ret map[string]NfInstanceInfo
return ret
}
return *o.NfInstanceList
}
// GetNfInstanceListOk returns a tuple with the NfInstanceList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResult) GetNfInstanceListOk() (*map[string]NfInstanceInfo, bool) {
if o == nil || IsNil(o.NfInstanceList) {
return nil, false
}
return o.NfInstanceList, true
}
// HasNfInstanceList returns a boolean if a field has been set.
func (o *SearchResult) HasNfInstanceList() bool {
if o != nil && !IsNil(o.NfInstanceList) {
return true
}
return false
}
// SetNfInstanceList gets a reference to the given map[string]NfInstanceInfo and assigns it to the NfInstanceList field.
func (o *SearchResult) SetNfInstanceList(v map[string]NfInstanceInfo) {
o.NfInstanceList = &v
}
// GetAlteredPriorityInd returns the AlteredPriorityInd field value if set, zero value otherwise.
func (o *SearchResult) GetAlteredPriorityInd() bool {
if o == nil || IsNil(o.AlteredPriorityInd) {
var ret bool
return ret
}
return *o.AlteredPriorityInd
}
// GetAlteredPriorityIndOk returns a tuple with the AlteredPriorityInd field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResult) GetAlteredPriorityIndOk() (*bool, bool) {
if o == nil || IsNil(o.AlteredPriorityInd) {
return nil, false
}
return o.AlteredPriorityInd, true
}
// HasAlteredPriorityInd returns a boolean if a field has been set.
func (o *SearchResult) HasAlteredPriorityInd() bool {
if o != nil && !IsNil(o.AlteredPriorityInd) {
return true
}
return false
}
// SetAlteredPriorityInd gets a reference to the given bool and assigns it to the AlteredPriorityInd field.
func (o *SearchResult) SetAlteredPriorityInd(v bool) {
o.AlteredPriorityInd = &v
}
// GetNoProfileMatchInfo returns the NoProfileMatchInfo field value if set, zero value otherwise.
func (o *SearchResult) GetNoProfileMatchInfo() NoProfileMatchInfo {
if o == nil || IsNil(o.NoProfileMatchInfo) {
var ret NoProfileMatchInfo
return ret
}
return *o.NoProfileMatchInfo
}
// GetNoProfileMatchInfoOk returns a tuple with the NoProfileMatchInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResult) GetNoProfileMatchInfoOk() (*NoProfileMatchInfo, bool) {
if o == nil || IsNil(o.NoProfileMatchInfo) {
return nil, false
}
return o.NoProfileMatchInfo, true
}
// HasNoProfileMatchInfo returns a boolean if a field has been set.
func (o *SearchResult) HasNoProfileMatchInfo() bool {
if o != nil && !IsNil(o.NoProfileMatchInfo) {
return true
}
return false
}
// SetNoProfileMatchInfo gets a reference to the given NoProfileMatchInfo and assigns it to the NoProfileMatchInfo field.
func (o *SearchResult) SetNoProfileMatchInfo(v NoProfileMatchInfo) {
o.NoProfileMatchInfo = &v
}
func (o SearchResult) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SearchResult) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ValidityPeriod) {
toSerialize["validityPeriod"] = o.ValidityPeriod
}
toSerialize["nfInstances"] = o.NfInstances
if !IsNil(o.SearchId) {
toSerialize["searchId"] = o.SearchId
}
if !IsNil(o.NumNfInstComplete) {
toSerialize["numNfInstComplete"] = o.NumNfInstComplete
}
if !IsNil(o.PreferredSearch) {
toSerialize["preferredSearch"] = o.PreferredSearch
}
if !IsNil(o.NrfSupportedFeatures) {
toSerialize["nrfSupportedFeatures"] = o.NrfSupportedFeatures
}
if !IsNil(o.NfInstanceList) {
toSerialize["nfInstanceList"] = o.NfInstanceList
}
if !IsNil(o.AlteredPriorityInd) {
toSerialize["alteredPriorityInd"] = o.AlteredPriorityInd
}
if !IsNil(o.NoProfileMatchInfo) {
toSerialize["noProfileMatchInfo"] = o.NoProfileMatchInfo
}
return toSerialize, nil
}
func (o *SearchResult) 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{
"nfInstances",
}
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)
}
}
varSearchResult := _SearchResult{}
err = json.Unmarshal(bytes, &varSearchResult)
if err != nil {
return err
}
*o = SearchResult(varSearchResult)
return err
}
type NullableSearchResult struct {
value *SearchResult
isSet bool
}
func (v NullableSearchResult) Get() *SearchResult {
return v.value
}
func (v *NullableSearchResult) Set(val *SearchResult) {
v.value = val
v.isSet = true
}
func (v NullableSearchResult) IsSet() bool {
return v.isSet
}
func (v *NullableSearchResult) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSearchResult(val *SearchResult) *NullableSearchResult {
return &NullableSearchResult{value: val, isSet: true}
}
func (v NullableSearchResult) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSearchResult) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。