1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_pfd_data_for_app.go 10.92 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
Nnef_PFDmanagement Service API
Packet Flow Description Management Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nnef_PFDmanagement
import (
"encoding/json"
"fmt"
"time"
)
// checks if the PfdDataForApp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PfdDataForApp{}
// PfdDataForApp Represents the PFDs for an application identifier.
type PfdDataForApp struct {
// String providing an application identifier.
ApplicationId string `json:"applicationId"`
Pfds []PfdContent `json:"pfds,omitempty"`
// string with format 'date-time' as defined in OpenAPI.
CachingTime *time.Time `json:"cachingTime,omitempty"`
// indicating a time in seconds.
CachingTimer *int32 `json:"cachingTimer,omitempty"`
// string with format 'date-time' as defined in OpenAPI.
PfdTimestamp *time.Time `json:"pfdTimestamp,omitempty"`
PartialFlag *bool `json:"partialFlag,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.
SupportedFeatures *string `json:"supportedFeatures,omitempty"`
}
type _PfdDataForApp PfdDataForApp
// NewPfdDataForApp instantiates a new PfdDataForApp 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 NewPfdDataForApp(applicationId string) *PfdDataForApp {
this := PfdDataForApp{}
this.ApplicationId = applicationId
return &this
}
// NewPfdDataForAppWithDefaults instantiates a new PfdDataForApp 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 NewPfdDataForAppWithDefaults() *PfdDataForApp {
this := PfdDataForApp{}
return &this
}
// GetApplicationId returns the ApplicationId field value
func (o *PfdDataForApp) GetApplicationId() string {
if o == nil {
var ret string
return ret
}
return o.ApplicationId
}
// GetApplicationIdOk returns a tuple with the ApplicationId field value
// and a boolean to check if the value has been set.
func (o *PfdDataForApp) GetApplicationIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ApplicationId, true
}
// SetApplicationId sets field value
func (o *PfdDataForApp) SetApplicationId(v string) {
o.ApplicationId = v
}
// GetPfds returns the Pfds field value if set, zero value otherwise.
func (o *PfdDataForApp) GetPfds() []PfdContent {
if o == nil || IsNil(o.Pfds) {
var ret []PfdContent
return ret
}
return o.Pfds
}
// GetPfdsOk returns a tuple with the Pfds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PfdDataForApp) GetPfdsOk() ([]PfdContent, bool) {
if o == nil || IsNil(o.Pfds) {
return nil, false
}
return o.Pfds, true
}
// HasPfds returns a boolean if a field has been set.
func (o *PfdDataForApp) HasPfds() bool {
if o != nil && !IsNil(o.Pfds) {
return true
}
return false
}
// SetPfds gets a reference to the given []PfdContent and assigns it to the Pfds field.
func (o *PfdDataForApp) SetPfds(v []PfdContent) {
o.Pfds = v
}
// GetCachingTime returns the CachingTime field value if set, zero value otherwise.
func (o *PfdDataForApp) GetCachingTime() time.Time {
if o == nil || IsNil(o.CachingTime) {
var ret time.Time
return ret
}
return *o.CachingTime
}
// GetCachingTimeOk returns a tuple with the CachingTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PfdDataForApp) GetCachingTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.CachingTime) {
return nil, false
}
return o.CachingTime, true
}
// HasCachingTime returns a boolean if a field has been set.
func (o *PfdDataForApp) HasCachingTime() bool {
if o != nil && !IsNil(o.CachingTime) {
return true
}
return false
}
// SetCachingTime gets a reference to the given time.Time and assigns it to the CachingTime field.
func (o *PfdDataForApp) SetCachingTime(v time.Time) {
o.CachingTime = &v
}
// GetCachingTimer returns the CachingTimer field value if set, zero value otherwise.
func (o *PfdDataForApp) GetCachingTimer() int32 {
if o == nil || IsNil(o.CachingTimer) {
var ret int32
return ret
}
return *o.CachingTimer
}
// GetCachingTimerOk returns a tuple with the CachingTimer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PfdDataForApp) GetCachingTimerOk() (*int32, bool) {
if o == nil || IsNil(o.CachingTimer) {
return nil, false
}
return o.CachingTimer, true
}
// HasCachingTimer returns a boolean if a field has been set.
func (o *PfdDataForApp) HasCachingTimer() bool {
if o != nil && !IsNil(o.CachingTimer) {
return true
}
return false
}
// SetCachingTimer gets a reference to the given int32 and assigns it to the CachingTimer field.
func (o *PfdDataForApp) SetCachingTimer(v int32) {
o.CachingTimer = &v
}
// GetPfdTimestamp returns the PfdTimestamp field value if set, zero value otherwise.
func (o *PfdDataForApp) GetPfdTimestamp() time.Time {
if o == nil || IsNil(o.PfdTimestamp) {
var ret time.Time
return ret
}
return *o.PfdTimestamp
}
// GetPfdTimestampOk returns a tuple with the PfdTimestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PfdDataForApp) GetPfdTimestampOk() (*time.Time, bool) {
if o == nil || IsNil(o.PfdTimestamp) {
return nil, false
}
return o.PfdTimestamp, true
}
// HasPfdTimestamp returns a boolean if a field has been set.
func (o *PfdDataForApp) HasPfdTimestamp() bool {
if o != nil && !IsNil(o.PfdTimestamp) {
return true
}
return false
}
// SetPfdTimestamp gets a reference to the given time.Time and assigns it to the PfdTimestamp field.
func (o *PfdDataForApp) SetPfdTimestamp(v time.Time) {
o.PfdTimestamp = &v
}
// GetPartialFlag returns the PartialFlag field value if set, zero value otherwise.
func (o *PfdDataForApp) GetPartialFlag() bool {
if o == nil || IsNil(o.PartialFlag) {
var ret bool
return ret
}
return *o.PartialFlag
}
// GetPartialFlagOk returns a tuple with the PartialFlag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PfdDataForApp) GetPartialFlagOk() (*bool, bool) {
if o == nil || IsNil(o.PartialFlag) {
return nil, false
}
return o.PartialFlag, true
}
// HasPartialFlag returns a boolean if a field has been set.
func (o *PfdDataForApp) HasPartialFlag() bool {
if o != nil && !IsNil(o.PartialFlag) {
return true
}
return false
}
// SetPartialFlag gets a reference to the given bool and assigns it to the PartialFlag field.
func (o *PfdDataForApp) SetPartialFlag(v bool) {
o.PartialFlag = &v
}
// GetSupportedFeatures returns the SupportedFeatures field value if set, zero value otherwise.
func (o *PfdDataForApp) GetSupportedFeatures() string {
if o == nil || IsNil(o.SupportedFeatures) {
var ret string
return ret
}
return *o.SupportedFeatures
}
// GetSupportedFeaturesOk returns a tuple with the SupportedFeatures field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PfdDataForApp) GetSupportedFeaturesOk() (*string, bool) {
if o == nil || IsNil(o.SupportedFeatures) {
return nil, false
}
return o.SupportedFeatures, true
}
// HasSupportedFeatures returns a boolean if a field has been set.
func (o *PfdDataForApp) HasSupportedFeatures() bool {
if o != nil && !IsNil(o.SupportedFeatures) {
return true
}
return false
}
// SetSupportedFeatures gets a reference to the given string and assigns it to the SupportedFeatures field.
func (o *PfdDataForApp) SetSupportedFeatures(v string) {
o.SupportedFeatures = &v
}
func (o PfdDataForApp) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PfdDataForApp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["applicationId"] = o.ApplicationId
if !IsNil(o.Pfds) {
toSerialize["pfds"] = o.Pfds
}
if !IsNil(o.CachingTime) {
toSerialize["cachingTime"] = o.CachingTime
}
if !IsNil(o.CachingTimer) {
toSerialize["cachingTimer"] = o.CachingTimer
}
if !IsNil(o.PfdTimestamp) {
toSerialize["pfdTimestamp"] = o.PfdTimestamp
}
if !IsNil(o.PartialFlag) {
toSerialize["partialFlag"] = o.PartialFlag
}
if !IsNil(o.SupportedFeatures) {
toSerialize["supportedFeatures"] = o.SupportedFeatures
}
return toSerialize, nil
}
func (o *PfdDataForApp) 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{
"applicationId",
}
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)
}
}
varPfdDataForApp := _PfdDataForApp{}
err = json.Unmarshal(bytes, &varPfdDataForApp)
if err != nil {
return err
}
*o = PfdDataForApp(varPfdDataForApp)
return err
}
type NullablePfdDataForApp struct {
value *PfdDataForApp
isSet bool
}
func (v NullablePfdDataForApp) Get() *PfdDataForApp {
return v.value
}
func (v *NullablePfdDataForApp) Set(val *PfdDataForApp) {
v.value = val
v.isSet = true
}
func (v NullablePfdDataForApp) IsSet() bool {
return v.isSet
}
func (v *NullablePfdDataForApp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePfdDataForApp(val *PfdDataForApp) *NullablePfdDataForApp {
return &NullablePfdDataForApp{value: val, isSet: true}
}
func (v NullablePfdDataForApp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePfdDataForApp) 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

搜索帮助