代码拉取完成,页面将自动刷新
/*
Nsmf_EventExposure
Session Management Event Exposure Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nsmf_EventExposure
import (
"encoding/json"
"fmt"
)
// checks if the TransactionInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TransactionInfo{}
// TransactionInfo Represents SMF Transaction Information.
type TransactionInfo struct {
// Unsigned Integer, i.e. only value 0 and integers above 0 are permissible.
Transaction int32 `json:"transaction"`
Snssai *Snssai `json:"snssai,omitempty"`
AppIds []string `json:"appIds,omitempty"`
TransacMetrics []TransactionMetric `json:"transacMetrics,omitempty"`
}
type _TransactionInfo TransactionInfo
// NewTransactionInfo instantiates a new TransactionInfo 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 NewTransactionInfo(transaction int32) *TransactionInfo {
this := TransactionInfo{}
this.Transaction = transaction
return &this
}
// NewTransactionInfoWithDefaults instantiates a new TransactionInfo 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 NewTransactionInfoWithDefaults() *TransactionInfo {
this := TransactionInfo{}
return &this
}
// GetTransaction returns the Transaction field value
func (o *TransactionInfo) GetTransaction() int32 {
if o == nil {
var ret int32
return ret
}
return o.Transaction
}
// GetTransactionOk returns a tuple with the Transaction field value
// and a boolean to check if the value has been set.
func (o *TransactionInfo) GetTransactionOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Transaction, true
}
// SetTransaction sets field value
func (o *TransactionInfo) SetTransaction(v int32) {
o.Transaction = v
}
// GetSnssai returns the Snssai field value if set, zero value otherwise.
func (o *TransactionInfo) GetSnssai() Snssai {
if o == nil || IsNil(o.Snssai) {
var ret Snssai
return ret
}
return *o.Snssai
}
// GetSnssaiOk returns a tuple with the Snssai field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionInfo) GetSnssaiOk() (*Snssai, bool) {
if o == nil || IsNil(o.Snssai) {
return nil, false
}
return o.Snssai, true
}
// HasSnssai returns a boolean if a field has been set.
func (o *TransactionInfo) HasSnssai() bool {
if o != nil && !IsNil(o.Snssai) {
return true
}
return false
}
// SetSnssai gets a reference to the given Snssai and assigns it to the Snssai field.
func (o *TransactionInfo) SetSnssai(v Snssai) {
o.Snssai = &v
}
// GetAppIds returns the AppIds field value if set, zero value otherwise.
func (o *TransactionInfo) GetAppIds() []string {
if o == nil || IsNil(o.AppIds) {
var ret []string
return ret
}
return o.AppIds
}
// GetAppIdsOk returns a tuple with the AppIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionInfo) GetAppIdsOk() ([]string, bool) {
if o == nil || IsNil(o.AppIds) {
return nil, false
}
return o.AppIds, true
}
// HasAppIds returns a boolean if a field has been set.
func (o *TransactionInfo) HasAppIds() bool {
if o != nil && !IsNil(o.AppIds) {
return true
}
return false
}
// SetAppIds gets a reference to the given []string and assigns it to the AppIds field.
func (o *TransactionInfo) SetAppIds(v []string) {
o.AppIds = v
}
// GetTransacMetrics returns the TransacMetrics field value if set, zero value otherwise.
func (o *TransactionInfo) GetTransacMetrics() []TransactionMetric {
if o == nil || IsNil(o.TransacMetrics) {
var ret []TransactionMetric
return ret
}
return o.TransacMetrics
}
// GetTransacMetricsOk returns a tuple with the TransacMetrics field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionInfo) GetTransacMetricsOk() ([]TransactionMetric, bool) {
if o == nil || IsNil(o.TransacMetrics) {
return nil, false
}
return o.TransacMetrics, true
}
// HasTransacMetrics returns a boolean if a field has been set.
func (o *TransactionInfo) HasTransacMetrics() bool {
if o != nil && !IsNil(o.TransacMetrics) {
return true
}
return false
}
// SetTransacMetrics gets a reference to the given []TransactionMetric and assigns it to the TransacMetrics field.
func (o *TransactionInfo) SetTransacMetrics(v []TransactionMetric) {
o.TransacMetrics = v
}
func (o TransactionInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TransactionInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["transaction"] = o.Transaction
if !IsNil(o.Snssai) {
toSerialize["snssai"] = o.Snssai
}
if !IsNil(o.AppIds) {
toSerialize["appIds"] = o.AppIds
}
if !IsNil(o.TransacMetrics) {
toSerialize["transacMetrics"] = o.TransacMetrics
}
return toSerialize, nil
}
func (o *TransactionInfo) 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{
"transaction",
}
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)
}
}
varTransactionInfo := _TransactionInfo{}
err = json.Unmarshal(bytes, &varTransactionInfo)
if err != nil {
return err
}
*o = TransactionInfo(varTransactionInfo)
return err
}
type NullableTransactionInfo struct {
value *TransactionInfo
isSet bool
}
func (v NullableTransactionInfo) Get() *TransactionInfo {
return v.value
}
func (v *NullableTransactionInfo) Set(val *TransactionInfo) {
v.value = val
v.isSet = true
}
func (v NullableTransactionInfo) IsSet() bool {
return v.isSet
}
func (v *NullableTransactionInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTransactionInfo(val *TransactionInfo) *NullableTransactionInfo {
return &NullableTransactionInfo{value: val, isSet: true}
}
func (v NullableTransactionInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTransactionInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。