代码拉取完成,页面将自动刷新
/*
3gpp-device-triggering
API for device trigger. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_DeviceTriggering
import (
"encoding/json"
"fmt"
)
// checks if the DeviceTriggering type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeviceTriggering{}
// DeviceTriggering Represents device triggering related information.
type DeviceTriggering struct {
// string formatted according to IETF RFC 3986 identifying a referenced resource.
Self *string `json:"self,omitempty"`
// string containing a local identifier followed by \"@\" and a domain identifier. Both the local identifier and the domain identifier shall be encoded as strings that do not contain any \"@\" characters. See Clause 4.6.2 of 3GPP TS 23.682 for more information.
ExternalId *string `json:"externalId,omitempty"`
// string formatted according to clause 3.3 of 3GPP TS 23.003 that describes an MSISDN.
Msisdn *string `json:"msisdn,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"`
// Unsigned integer identifying a period of time in units of seconds.
ValidityPeriod int32 `json:"validityPeriod"`
Priority Priority `json:"priority"`
// Unsigned integer with valid values between 0 and 65535.
ApplicationPortId int32 `json:"applicationPortId"`
// Unsigned integer with valid values between 0 and 65535.
AppSrcPortId *int32 `json:"appSrcPortId,omitempty"`
// String with format \"byte\" as defined in OpenAPI Specification, i.e, base64-encoded characters.
TriggerPayload string `json:"triggerPayload"`
// string formatted according to IETF RFC 3986 identifying a referenced resource.
NotificationDestination string `json:"notificationDestination"`
// Set to true by the SCS/AS to request the SCEF to send a test notification as defined in clause 5.2.5.3. Set to false or omitted otherwise.
RequestTestNotification *bool `json:"requestTestNotification,omitempty"`
WebsockNotifConfig *WebsockNotifConfig `json:"websockNotifConfig,omitempty"`
DeliveryResult *DeliveryResult `json:"deliveryResult,omitempty"`
}
type _DeviceTriggering DeviceTriggering
// NewDeviceTriggering instantiates a new DeviceTriggering 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 NewDeviceTriggering(validityPeriod int32, priority Priority, applicationPortId int32, triggerPayload string, notificationDestination string) *DeviceTriggering {
this := DeviceTriggering{}
return &this
}
// NewDeviceTriggeringWithDefaults instantiates a new DeviceTriggering 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 NewDeviceTriggeringWithDefaults() *DeviceTriggering {
this := DeviceTriggering{}
return &this
}
// GetSelf returns the Self field value if set, zero value otherwise.
func (o *DeviceTriggering) GetSelf() string {
if o == nil || IsNil(o.Self) {
var ret string
return ret
}
return *o.Self
}
// GetSelfOk returns a tuple with the Self field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetSelfOk() (*string, bool) {
if o == nil || IsNil(o.Self) {
return nil, false
}
return o.Self, true
}
// HasSelf returns a boolean if a field has been set.
func (o *DeviceTriggering) HasSelf() bool {
if o != nil && !IsNil(o.Self) {
return true
}
return false
}
// SetSelf gets a reference to the given string and assigns it to the Self field.
func (o *DeviceTriggering) SetSelf(v string) {
o.Self = &v
}
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
func (o *DeviceTriggering) GetExternalId() string {
if o == nil || IsNil(o.ExternalId) {
var ret string
return ret
}
return *o.ExternalId
}
// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetExternalIdOk() (*string, bool) {
if o == nil || IsNil(o.ExternalId) {
return nil, false
}
return o.ExternalId, true
}
// HasExternalId returns a boolean if a field has been set.
func (o *DeviceTriggering) HasExternalId() bool {
if o != nil && !IsNil(o.ExternalId) {
return true
}
return false
}
// SetExternalId gets a reference to the given string and assigns it to the ExternalId field.
func (o *DeviceTriggering) SetExternalId(v string) {
o.ExternalId = &v
}
// GetMsisdn returns the Msisdn field value if set, zero value otherwise.
func (o *DeviceTriggering) GetMsisdn() string {
if o == nil || IsNil(o.Msisdn) {
var ret string
return ret
}
return *o.Msisdn
}
// GetMsisdnOk returns a tuple with the Msisdn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetMsisdnOk() (*string, bool) {
if o == nil || IsNil(o.Msisdn) {
return nil, false
}
return o.Msisdn, true
}
// HasMsisdn returns a boolean if a field has been set.
func (o *DeviceTriggering) HasMsisdn() bool {
if o != nil && !IsNil(o.Msisdn) {
return true
}
return false
}
// SetMsisdn gets a reference to the given string and assigns it to the Msisdn field.
func (o *DeviceTriggering) SetMsisdn(v string) {
o.Msisdn = &v
}
// GetSupportedFeatures returns the SupportedFeatures field value if set, zero value otherwise.
func (o *DeviceTriggering) 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 *DeviceTriggering) 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 *DeviceTriggering) 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 *DeviceTriggering) SetSupportedFeatures(v string) {
o.SupportedFeatures = &v
}
// GetValidityPeriod returns the ValidityPeriod field value
func (o *DeviceTriggering) GetValidityPeriod() int32 {
if o == nil {
var ret int32
return ret
}
return o.ValidityPeriod
}
// GetValidityPeriodOk returns a tuple with the ValidityPeriod field value
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetValidityPeriodOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.ValidityPeriod, true
}
// SetValidityPeriod sets field value
func (o *DeviceTriggering) SetValidityPeriod(v int32) {
o.ValidityPeriod = v
}
// GetPriority returns the Priority field value
func (o *DeviceTriggering) GetPriority() Priority {
if o == nil {
var ret Priority
return ret
}
return o.Priority
}
// GetPriorityOk returns a tuple with the Priority field value
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetPriorityOk() (*Priority, bool) {
if o == nil {
return nil, false
}
return &o.Priority, true
}
// SetPriority sets field value
func (o *DeviceTriggering) SetPriority(v Priority) {
o.Priority = v
}
// GetApplicationPortId returns the ApplicationPortId field value
func (o *DeviceTriggering) GetApplicationPortId() int32 {
if o == nil {
var ret int32
return ret
}
return o.ApplicationPortId
}
// GetApplicationPortIdOk returns a tuple with the ApplicationPortId field value
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetApplicationPortIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.ApplicationPortId, true
}
// SetApplicationPortId sets field value
func (o *DeviceTriggering) SetApplicationPortId(v int32) {
o.ApplicationPortId = v
}
// GetAppSrcPortId returns the AppSrcPortId field value if set, zero value otherwise.
func (o *DeviceTriggering) GetAppSrcPortId() int32 {
if o == nil || IsNil(o.AppSrcPortId) {
var ret int32
return ret
}
return *o.AppSrcPortId
}
// GetAppSrcPortIdOk returns a tuple with the AppSrcPortId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetAppSrcPortIdOk() (*int32, bool) {
if o == nil || IsNil(o.AppSrcPortId) {
return nil, false
}
return o.AppSrcPortId, true
}
// HasAppSrcPortId returns a boolean if a field has been set.
func (o *DeviceTriggering) HasAppSrcPortId() bool {
if o != nil && !IsNil(o.AppSrcPortId) {
return true
}
return false
}
// SetAppSrcPortId gets a reference to the given int32 and assigns it to the AppSrcPortId field.
func (o *DeviceTriggering) SetAppSrcPortId(v int32) {
o.AppSrcPortId = &v
}
// GetTriggerPayload returns the TriggerPayload field value
func (o *DeviceTriggering) GetTriggerPayload() string {
if o == nil {
var ret string
return ret
}
return o.TriggerPayload
}
// GetTriggerPayloadOk returns a tuple with the TriggerPayload field value
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetTriggerPayloadOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.TriggerPayload, true
}
// SetTriggerPayload sets field value
func (o *DeviceTriggering) SetTriggerPayload(v string) {
o.TriggerPayload = v
}
// GetNotificationDestination returns the NotificationDestination field value
func (o *DeviceTriggering) GetNotificationDestination() string {
if o == nil {
var ret string
return ret
}
return o.NotificationDestination
}
// GetNotificationDestinationOk returns a tuple with the NotificationDestination field value
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetNotificationDestinationOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NotificationDestination, true
}
// SetNotificationDestination sets field value
func (o *DeviceTriggering) SetNotificationDestination(v string) {
o.NotificationDestination = v
}
// GetRequestTestNotification returns the RequestTestNotification field value if set, zero value otherwise.
func (o *DeviceTriggering) GetRequestTestNotification() bool {
if o == nil || IsNil(o.RequestTestNotification) {
var ret bool
return ret
}
return *o.RequestTestNotification
}
// GetRequestTestNotificationOk returns a tuple with the RequestTestNotification field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetRequestTestNotificationOk() (*bool, bool) {
if o == nil || IsNil(o.RequestTestNotification) {
return nil, false
}
return o.RequestTestNotification, true
}
// HasRequestTestNotification returns a boolean if a field has been set.
func (o *DeviceTriggering) HasRequestTestNotification() bool {
if o != nil && !IsNil(o.RequestTestNotification) {
return true
}
return false
}
// SetRequestTestNotification gets a reference to the given bool and assigns it to the RequestTestNotification field.
func (o *DeviceTriggering) SetRequestTestNotification(v bool) {
o.RequestTestNotification = &v
}
// GetWebsockNotifConfig returns the WebsockNotifConfig field value if set, zero value otherwise.
func (o *DeviceTriggering) GetWebsockNotifConfig() WebsockNotifConfig {
if o == nil || IsNil(o.WebsockNotifConfig) {
var ret WebsockNotifConfig
return ret
}
return *o.WebsockNotifConfig
}
// GetWebsockNotifConfigOk returns a tuple with the WebsockNotifConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetWebsockNotifConfigOk() (*WebsockNotifConfig, bool) {
if o == nil || IsNil(o.WebsockNotifConfig) {
return nil, false
}
return o.WebsockNotifConfig, true
}
// HasWebsockNotifConfig returns a boolean if a field has been set.
func (o *DeviceTriggering) HasWebsockNotifConfig() bool {
if o != nil && !IsNil(o.WebsockNotifConfig) {
return true
}
return false
}
// SetWebsockNotifConfig gets a reference to the given WebsockNotifConfig and assigns it to the WebsockNotifConfig field.
func (o *DeviceTriggering) SetWebsockNotifConfig(v WebsockNotifConfig) {
o.WebsockNotifConfig = &v
}
// GetDeliveryResult returns the DeliveryResult field value if set, zero value otherwise.
func (o *DeviceTriggering) GetDeliveryResult() DeliveryResult {
if o == nil || IsNil(o.DeliveryResult) {
var ret DeliveryResult
return ret
}
return *o.DeliveryResult
}
// GetDeliveryResultOk returns a tuple with the DeliveryResult field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceTriggering) GetDeliveryResultOk() (*DeliveryResult, bool) {
if o == nil || IsNil(o.DeliveryResult) {
return nil, false
}
return o.DeliveryResult, true
}
// HasDeliveryResult returns a boolean if a field has been set.
func (o *DeviceTriggering) HasDeliveryResult() bool {
if o != nil && !IsNil(o.DeliveryResult) {
return true
}
return false
}
// SetDeliveryResult gets a reference to the given DeliveryResult and assigns it to the DeliveryResult field.
func (o *DeviceTriggering) SetDeliveryResult(v DeliveryResult) {
o.DeliveryResult = &v
}
func (o DeviceTriggering) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeviceTriggering) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Self) {
toSerialize["self"] = o.Self
}
if !IsNil(o.ExternalId) {
toSerialize["externalId"] = o.ExternalId
}
if !IsNil(o.Msisdn) {
toSerialize["msisdn"] = o.Msisdn
}
if !IsNil(o.SupportedFeatures) {
toSerialize["supportedFeatures"] = o.SupportedFeatures
}
toSerialize["validityPeriod"] = o.ValidityPeriod
toSerialize["priority"] = o.Priority
toSerialize["applicationPortId"] = o.ApplicationPortId
if !IsNil(o.AppSrcPortId) {
toSerialize["appSrcPortId"] = o.AppSrcPortId
}
toSerialize["triggerPayload"] = o.TriggerPayload
toSerialize["notificationDestination"] = o.NotificationDestination
if !IsNil(o.RequestTestNotification) {
toSerialize["requestTestNotification"] = o.RequestTestNotification
}
if !IsNil(o.WebsockNotifConfig) {
toSerialize["websockNotifConfig"] = o.WebsockNotifConfig
}
if !IsNil(o.DeliveryResult) {
toSerialize["deliveryResult"] = o.DeliveryResult
}
return toSerialize, nil
}
func (o *DeviceTriggering) 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{
"validityPeriod",
"priority",
"applicationPortId",
"triggerPayload",
"notificationDestination",
}
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)
}
}
varDeviceTriggering := _DeviceTriggering{}
err = json.Unmarshal(bytes, &varDeviceTriggering)
if err != nil {
return err
}
*o = DeviceTriggering(varDeviceTriggering)
return err
}
type NullableDeviceTriggering struct {
value *DeviceTriggering
isSet bool
}
func (v NullableDeviceTriggering) Get() *DeviceTriggering {
return v.value
}
func (v *NullableDeviceTriggering) Set(val *DeviceTriggering) {
v.value = val
v.isSet = true
}
func (v NullableDeviceTriggering) IsSet() bool {
return v.isSet
}
func (v *NullableDeviceTriggering) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeviceTriggering(val *DeviceTriggering) *NullableDeviceTriggering {
return &NullableDeviceTriggering{value: val, isSet: true}
}
func (v NullableDeviceTriggering) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeviceTriggering) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。