代码拉取完成,页面将自动刷新
/*
3gpp-ms-event-exposure
API for Media Streaming Event Exposure. © 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_MSEventExposure
import (
"encoding/json"
"fmt"
)
// checks if the NetworkAssistanceSession type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &NetworkAssistanceSession{}
// NetworkAssistanceSession A representation of a Network Assistance Session resource.
type NetworkAssistanceSession struct {
// String chosen by the 5GMS AF to serve as an identifier in a resource URI.
NaSessionId string `json:"naSessionId"`
// String chosen by the 5GMS AF to serve as an identifier in a resource URI.
ProvisioningSessionId string `json:"provisioningSessionId"`
ServiceDataFlowDescriptions []ServiceDataFlowDescription `json:"serviceDataFlowDescriptions"`
MediaType *MediaType `json:"mediaType,omitempty"`
// String chosen by the 5GMS AF to serve as an identifier in a resource URI.
PolicyTemplateId *string `json:"policyTemplateId,omitempty"`
RequestedQoS *M5QoSSpecification `json:"requestedQoS,omitempty"`
RecommendedQoS *M5QoSSpecification `json:"recommendedQoS,omitempty"`
// Absolute Uniform Resource Locator, conforming with the \"absolute-URI\" production specified in IETF RFC 3986, section 4.3 in which the scheme part is \"http\" or \"https\". Note that the \"query\" suffix is permitted by this production but the \"fragment\" suffix is not.
NotficationURL *string `json:"notficationURL,omitempty"`
}
type _NetworkAssistanceSession NetworkAssistanceSession
// NewNetworkAssistanceSession instantiates a new NetworkAssistanceSession 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 NewNetworkAssistanceSession(naSessionId string, provisioningSessionId string, serviceDataFlowDescriptions []ServiceDataFlowDescription) *NetworkAssistanceSession {
this := NetworkAssistanceSession{}
this.NaSessionId = naSessionId
this.ProvisioningSessionId = provisioningSessionId
this.ServiceDataFlowDescriptions = serviceDataFlowDescriptions
return &this
}
// NewNetworkAssistanceSessionWithDefaults instantiates a new NetworkAssistanceSession 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 NewNetworkAssistanceSessionWithDefaults() *NetworkAssistanceSession {
this := NetworkAssistanceSession{}
return &this
}
// GetNaSessionId returns the NaSessionId field value
func (o *NetworkAssistanceSession) GetNaSessionId() string {
if o == nil {
var ret string
return ret
}
return o.NaSessionId
}
// GetNaSessionIdOk returns a tuple with the NaSessionId field value
// and a boolean to check if the value has been set.
func (o *NetworkAssistanceSession) GetNaSessionIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NaSessionId, true
}
// SetNaSessionId sets field value
func (o *NetworkAssistanceSession) SetNaSessionId(v string) {
o.NaSessionId = v
}
// GetProvisioningSessionId returns the ProvisioningSessionId field value
func (o *NetworkAssistanceSession) GetProvisioningSessionId() string {
if o == nil {
var ret string
return ret
}
return o.ProvisioningSessionId
}
// GetProvisioningSessionIdOk returns a tuple with the ProvisioningSessionId field value
// and a boolean to check if the value has been set.
func (o *NetworkAssistanceSession) GetProvisioningSessionIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ProvisioningSessionId, true
}
// SetProvisioningSessionId sets field value
func (o *NetworkAssistanceSession) SetProvisioningSessionId(v string) {
o.ProvisioningSessionId = v
}
// GetServiceDataFlowDescriptions returns the ServiceDataFlowDescriptions field value
func (o *NetworkAssistanceSession) GetServiceDataFlowDescriptions() []ServiceDataFlowDescription {
if o == nil {
var ret []ServiceDataFlowDescription
return ret
}
return o.ServiceDataFlowDescriptions
}
// GetServiceDataFlowDescriptionsOk returns a tuple with the ServiceDataFlowDescriptions field value
// and a boolean to check if the value has been set.
func (o *NetworkAssistanceSession) GetServiceDataFlowDescriptionsOk() ([]ServiceDataFlowDescription, bool) {
if o == nil {
return nil, false
}
return o.ServiceDataFlowDescriptions, true
}
// SetServiceDataFlowDescriptions sets field value
func (o *NetworkAssistanceSession) SetServiceDataFlowDescriptions(v []ServiceDataFlowDescription) {
o.ServiceDataFlowDescriptions = v
}
// GetMediaType returns the MediaType field value if set, zero value otherwise.
func (o *NetworkAssistanceSession) GetMediaType() MediaType {
if o == nil || IsNil(o.MediaType) {
var ret MediaType
return ret
}
return *o.MediaType
}
// GetMediaTypeOk returns a tuple with the MediaType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetworkAssistanceSession) GetMediaTypeOk() (*MediaType, bool) {
if o == nil || IsNil(o.MediaType) {
return nil, false
}
return o.MediaType, true
}
// HasMediaType returns a boolean if a field has been set.
func (o *NetworkAssistanceSession) HasMediaType() bool {
if o != nil && !IsNil(o.MediaType) {
return true
}
return false
}
// SetMediaType gets a reference to the given MediaType and assigns it to the MediaType field.
func (o *NetworkAssistanceSession) SetMediaType(v MediaType) {
o.MediaType = &v
}
// GetPolicyTemplateId returns the PolicyTemplateId field value if set, zero value otherwise.
func (o *NetworkAssistanceSession) GetPolicyTemplateId() string {
if o == nil || IsNil(o.PolicyTemplateId) {
var ret string
return ret
}
return *o.PolicyTemplateId
}
// GetPolicyTemplateIdOk returns a tuple with the PolicyTemplateId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetworkAssistanceSession) GetPolicyTemplateIdOk() (*string, bool) {
if o == nil || IsNil(o.PolicyTemplateId) {
return nil, false
}
return o.PolicyTemplateId, true
}
// HasPolicyTemplateId returns a boolean if a field has been set.
func (o *NetworkAssistanceSession) HasPolicyTemplateId() bool {
if o != nil && !IsNil(o.PolicyTemplateId) {
return true
}
return false
}
// SetPolicyTemplateId gets a reference to the given string and assigns it to the PolicyTemplateId field.
func (o *NetworkAssistanceSession) SetPolicyTemplateId(v string) {
o.PolicyTemplateId = &v
}
// GetRequestedQoS returns the RequestedQoS field value if set, zero value otherwise.
func (o *NetworkAssistanceSession) GetRequestedQoS() M5QoSSpecification {
if o == nil || IsNil(o.RequestedQoS) {
var ret M5QoSSpecification
return ret
}
return *o.RequestedQoS
}
// GetRequestedQoSOk returns a tuple with the RequestedQoS field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetworkAssistanceSession) GetRequestedQoSOk() (*M5QoSSpecification, bool) {
if o == nil || IsNil(o.RequestedQoS) {
return nil, false
}
return o.RequestedQoS, true
}
// HasRequestedQoS returns a boolean if a field has been set.
func (o *NetworkAssistanceSession) HasRequestedQoS() bool {
if o != nil && !IsNil(o.RequestedQoS) {
return true
}
return false
}
// SetRequestedQoS gets a reference to the given M5QoSSpecification and assigns it to the RequestedQoS field.
func (o *NetworkAssistanceSession) SetRequestedQoS(v M5QoSSpecification) {
o.RequestedQoS = &v
}
// GetRecommendedQoS returns the RecommendedQoS field value if set, zero value otherwise.
func (o *NetworkAssistanceSession) GetRecommendedQoS() M5QoSSpecification {
if o == nil || IsNil(o.RecommendedQoS) {
var ret M5QoSSpecification
return ret
}
return *o.RecommendedQoS
}
// GetRecommendedQoSOk returns a tuple with the RecommendedQoS field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetworkAssistanceSession) GetRecommendedQoSOk() (*M5QoSSpecification, bool) {
if o == nil || IsNil(o.RecommendedQoS) {
return nil, false
}
return o.RecommendedQoS, true
}
// HasRecommendedQoS returns a boolean if a field has been set.
func (o *NetworkAssistanceSession) HasRecommendedQoS() bool {
if o != nil && !IsNil(o.RecommendedQoS) {
return true
}
return false
}
// SetRecommendedQoS gets a reference to the given M5QoSSpecification and assigns it to the RecommendedQoS field.
func (o *NetworkAssistanceSession) SetRecommendedQoS(v M5QoSSpecification) {
o.RecommendedQoS = &v
}
// GetNotficationURL returns the NotficationURL field value if set, zero value otherwise.
func (o *NetworkAssistanceSession) GetNotficationURL() string {
if o == nil || IsNil(o.NotficationURL) {
var ret string
return ret
}
return *o.NotficationURL
}
// GetNotficationURLOk returns a tuple with the NotficationURL field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetworkAssistanceSession) GetNotficationURLOk() (*string, bool) {
if o == nil || IsNil(o.NotficationURL) {
return nil, false
}
return o.NotficationURL, true
}
// HasNotficationURL returns a boolean if a field has been set.
func (o *NetworkAssistanceSession) HasNotficationURL() bool {
if o != nil && !IsNil(o.NotficationURL) {
return true
}
return false
}
// SetNotficationURL gets a reference to the given string and assigns it to the NotficationURL field.
func (o *NetworkAssistanceSession) SetNotficationURL(v string) {
o.NotficationURL = &v
}
func (o NetworkAssistanceSession) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o NetworkAssistanceSession) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["naSessionId"] = o.NaSessionId
toSerialize["provisioningSessionId"] = o.ProvisioningSessionId
toSerialize["serviceDataFlowDescriptions"] = o.ServiceDataFlowDescriptions
if !IsNil(o.MediaType) {
toSerialize["mediaType"] = o.MediaType
}
if !IsNil(o.PolicyTemplateId) {
toSerialize["policyTemplateId"] = o.PolicyTemplateId
}
if !IsNil(o.RequestedQoS) {
toSerialize["requestedQoS"] = o.RequestedQoS
}
if !IsNil(o.RecommendedQoS) {
toSerialize["recommendedQoS"] = o.RecommendedQoS
}
if !IsNil(o.NotficationURL) {
toSerialize["notficationURL"] = o.NotficationURL
}
return toSerialize, nil
}
func (o *NetworkAssistanceSession) 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{
"naSessionId",
"provisioningSessionId",
"serviceDataFlowDescriptions",
}
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)
}
}
varNetworkAssistanceSession := _NetworkAssistanceSession{}
err = json.Unmarshal(bytes, &varNetworkAssistanceSession)
if err != nil {
return err
}
*o = NetworkAssistanceSession(varNetworkAssistanceSession)
return err
}
type NullableNetworkAssistanceSession struct {
value *NetworkAssistanceSession
isSet bool
}
func (v NullableNetworkAssistanceSession) Get() *NetworkAssistanceSession {
return v.value
}
func (v *NullableNetworkAssistanceSession) Set(val *NetworkAssistanceSession) {
v.value = val
v.isSet = true
}
func (v NullableNetworkAssistanceSession) IsSet() bool {
return v.isSet
}
func (v *NullableNetworkAssistanceSession) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNetworkAssistanceSession(val *NetworkAssistanceSession) *NullableNetworkAssistanceSession {
return &NullableNetworkAssistanceSession{value: val, isSet: true}
}
func (v NullableNetworkAssistanceSession) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNetworkAssistanceSession) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。