代码拉取完成,页面将自动刷新
/*
Npcf_SMPolicyControl API
Session Management Policy Control Service © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Npcf_SMPolicyControl
import (
"encoding/json"
"fmt"
)
// checks if the AppDetectionInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AppDetectionInfo{}
// AppDetectionInfo Contains the detected application's traffic information.
type AppDetectionInfo struct {
// A reference to the application detection filter configured at the UPF
AppId string `json:"appId"`
// Identifier sent by the SMF in order to allow correlation of application Start and Stop events to the specific service data flow description, if service data flow descriptions are deducible.
InstanceId *string `json:"instanceId,omitempty"`
// Contains the detected service data flow descriptions if they are deducible.
SdfDescriptions []FlowInformation `json:"sdfDescriptions,omitempty"`
}
type _AppDetectionInfo AppDetectionInfo
// NewAppDetectionInfo instantiates a new AppDetectionInfo 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 NewAppDetectionInfo(appId string) *AppDetectionInfo {
this := AppDetectionInfo{}
this.AppId = appId
return &this
}
// NewAppDetectionInfoWithDefaults instantiates a new AppDetectionInfo 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 NewAppDetectionInfoWithDefaults() *AppDetectionInfo {
this := AppDetectionInfo{}
return &this
}
// GetAppId returns the AppId field value
func (o *AppDetectionInfo) GetAppId() string {
if o == nil {
var ret string
return ret
}
return o.AppId
}
// GetAppIdOk returns a tuple with the AppId field value
// and a boolean to check if the value has been set.
func (o *AppDetectionInfo) GetAppIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AppId, true
}
// SetAppId sets field value
func (o *AppDetectionInfo) SetAppId(v string) {
o.AppId = v
}
// GetInstanceId returns the InstanceId field value if set, zero value otherwise.
func (o *AppDetectionInfo) GetInstanceId() string {
if o == nil || IsNil(o.InstanceId) {
var ret string
return ret
}
return *o.InstanceId
}
// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AppDetectionInfo) GetInstanceIdOk() (*string, bool) {
if o == nil || IsNil(o.InstanceId) {
return nil, false
}
return o.InstanceId, true
}
// HasInstanceId returns a boolean if a field has been set.
func (o *AppDetectionInfo) HasInstanceId() bool {
if o != nil && !IsNil(o.InstanceId) {
return true
}
return false
}
// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field.
func (o *AppDetectionInfo) SetInstanceId(v string) {
o.InstanceId = &v
}
// GetSdfDescriptions returns the SdfDescriptions field value if set, zero value otherwise.
func (o *AppDetectionInfo) GetSdfDescriptions() []FlowInformation {
if o == nil || IsNil(o.SdfDescriptions) {
var ret []FlowInformation
return ret
}
return o.SdfDescriptions
}
// GetSdfDescriptionsOk returns a tuple with the SdfDescriptions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AppDetectionInfo) GetSdfDescriptionsOk() ([]FlowInformation, bool) {
if o == nil || IsNil(o.SdfDescriptions) {
return nil, false
}
return o.SdfDescriptions, true
}
// HasSdfDescriptions returns a boolean if a field has been set.
func (o *AppDetectionInfo) HasSdfDescriptions() bool {
if o != nil && !IsNil(o.SdfDescriptions) {
return true
}
return false
}
// SetSdfDescriptions gets a reference to the given []FlowInformation and assigns it to the SdfDescriptions field.
func (o *AppDetectionInfo) SetSdfDescriptions(v []FlowInformation) {
o.SdfDescriptions = v
}
func (o AppDetectionInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AppDetectionInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["appId"] = o.AppId
if !IsNil(o.InstanceId) {
toSerialize["instanceId"] = o.InstanceId
}
if !IsNil(o.SdfDescriptions) {
toSerialize["sdfDescriptions"] = o.SdfDescriptions
}
return toSerialize, nil
}
func (o *AppDetectionInfo) 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{
"appId",
}
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)
}
}
varAppDetectionInfo := _AppDetectionInfo{}
err = json.Unmarshal(bytes, &varAppDetectionInfo)
if err != nil {
return err
}
*o = AppDetectionInfo(varAppDetectionInfo)
return err
}
type NullableAppDetectionInfo struct {
value *AppDetectionInfo
isSet bool
}
func (v NullableAppDetectionInfo) Get() *AppDetectionInfo {
return v.value
}
func (v *NullableAppDetectionInfo) Set(val *AppDetectionInfo) {
v.value = val
v.isSet = true
}
func (v NullableAppDetectionInfo) IsSet() bool {
return v.isSet
}
func (v *NullableAppDetectionInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAppDetectionInfo(val *AppDetectionInfo) *NullableAppDetectionInfo {
return &NullableAppDetectionInfo{value: val, isSet: true}
}
func (v NullableAppDetectionInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAppDetectionInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。