代码拉取完成,页面将自动刷新
/*
3gpp-data-reporting
API for 3GPP Data Reporting. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_DataReporting
import (
"encoding/json"
"fmt"
"time"
)
// checks if the PerformanceDataRecord type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PerformanceDataRecord{}
// PerformanceDataRecord A data reporting record for UE performance.
type PerformanceDataRecord struct {
BaseRecord
TimeInterval TimeWindow `json:"timeInterval"`
Location *LocationArea5G `json:"location,omitempty"`
RemoteEndpoint *AddrFqdn `json:"remoteEndpoint,omitempty"`
// Unsigned integer indicating Packet Delay Budget (see clauses 5.7.3.4 and 5.7.4 of 3GPP TS 23.501), expressed in milliseconds.
PacketDelayBudget *int32 `json:"packetDelayBudget,omitempty"`
// Unsigned integer indicating Packet Loss Rate (see clauses 5.7.2.8 and 5.7.4 of 3GPP TS 23.501), expressed in tenth of percent.
PacketLossRate *int32 `json:"packetLossRate,omitempty"`
// String representing a bit rate; the prefixes follow the standard symbols from The International System of Units, and represent x1000 multipliers, with the exception that prefix \"K\" is used to represent the standard symbol \"k\".
UplinkThroughput *string `json:"uplinkThroughput,omitempty"`
// String representing a bit rate; the prefixes follow the standard symbols from The International System of Units, and represent x1000 multipliers, with the exception that prefix \"K\" is used to represent the standard symbol \"k\".
DownlinkThrougput *string `json:"downlinkThrougput,omitempty"`
}
type _PerformanceDataRecord PerformanceDataRecord
// NewPerformanceDataRecord instantiates a new PerformanceDataRecord 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 NewPerformanceDataRecord(timeInterval TimeWindow, timestamp time.Time) *PerformanceDataRecord {
this := PerformanceDataRecord{}
this.Timestamp = timestamp
this.TimeInterval = timeInterval
return &this
}
// NewPerformanceDataRecordWithDefaults instantiates a new PerformanceDataRecord 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 NewPerformanceDataRecordWithDefaults() *PerformanceDataRecord {
this := PerformanceDataRecord{}
return &this
}
// GetTimeInterval returns the TimeInterval field value
func (o *PerformanceDataRecord) GetTimeInterval() TimeWindow {
if o == nil {
var ret TimeWindow
return ret
}
return o.TimeInterval
}
// GetTimeIntervalOk returns a tuple with the TimeInterval field value
// and a boolean to check if the value has been set.
func (o *PerformanceDataRecord) GetTimeIntervalOk() (*TimeWindow, bool) {
if o == nil {
return nil, false
}
return &o.TimeInterval, true
}
// SetTimeInterval sets field value
func (o *PerformanceDataRecord) SetTimeInterval(v TimeWindow) {
o.TimeInterval = v
}
// GetLocation returns the Location field value if set, zero value otherwise.
func (o *PerformanceDataRecord) GetLocation() LocationArea5G {
if o == nil || IsNil(o.Location) {
var ret LocationArea5G
return ret
}
return *o.Location
}
// GetLocationOk returns a tuple with the Location field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceDataRecord) GetLocationOk() (*LocationArea5G, bool) {
if o == nil || IsNil(o.Location) {
return nil, false
}
return o.Location, true
}
// HasLocation returns a boolean if a field has been set.
func (o *PerformanceDataRecord) HasLocation() bool {
if o != nil && !IsNil(o.Location) {
return true
}
return false
}
// SetLocation gets a reference to the given LocationArea5G and assigns it to the Location field.
func (o *PerformanceDataRecord) SetLocation(v LocationArea5G) {
o.Location = &v
}
// GetRemoteEndpoint returns the RemoteEndpoint field value if set, zero value otherwise.
func (o *PerformanceDataRecord) GetRemoteEndpoint() AddrFqdn {
if o == nil || IsNil(o.RemoteEndpoint) {
var ret AddrFqdn
return ret
}
return *o.RemoteEndpoint
}
// GetRemoteEndpointOk returns a tuple with the RemoteEndpoint field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceDataRecord) GetRemoteEndpointOk() (*AddrFqdn, bool) {
if o == nil || IsNil(o.RemoteEndpoint) {
return nil, false
}
return o.RemoteEndpoint, true
}
// HasRemoteEndpoint returns a boolean if a field has been set.
func (o *PerformanceDataRecord) HasRemoteEndpoint() bool {
if o != nil && !IsNil(o.RemoteEndpoint) {
return true
}
return false
}
// SetRemoteEndpoint gets a reference to the given AddrFqdn and assigns it to the RemoteEndpoint field.
func (o *PerformanceDataRecord) SetRemoteEndpoint(v AddrFqdn) {
o.RemoteEndpoint = &v
}
// GetPacketDelayBudget returns the PacketDelayBudget field value if set, zero value otherwise.
func (o *PerformanceDataRecord) GetPacketDelayBudget() int32 {
if o == nil || IsNil(o.PacketDelayBudget) {
var ret int32
return ret
}
return *o.PacketDelayBudget
}
// GetPacketDelayBudgetOk returns a tuple with the PacketDelayBudget field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceDataRecord) GetPacketDelayBudgetOk() (*int32, bool) {
if o == nil || IsNil(o.PacketDelayBudget) {
return nil, false
}
return o.PacketDelayBudget, true
}
// HasPacketDelayBudget returns a boolean if a field has been set.
func (o *PerformanceDataRecord) HasPacketDelayBudget() bool {
if o != nil && !IsNil(o.PacketDelayBudget) {
return true
}
return false
}
// SetPacketDelayBudget gets a reference to the given int32 and assigns it to the PacketDelayBudget field.
func (o *PerformanceDataRecord) SetPacketDelayBudget(v int32) {
o.PacketDelayBudget = &v
}
// GetPacketLossRate returns the PacketLossRate field value if set, zero value otherwise.
func (o *PerformanceDataRecord) GetPacketLossRate() int32 {
if o == nil || IsNil(o.PacketLossRate) {
var ret int32
return ret
}
return *o.PacketLossRate
}
// GetPacketLossRateOk returns a tuple with the PacketLossRate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceDataRecord) GetPacketLossRateOk() (*int32, bool) {
if o == nil || IsNil(o.PacketLossRate) {
return nil, false
}
return o.PacketLossRate, true
}
// HasPacketLossRate returns a boolean if a field has been set.
func (o *PerformanceDataRecord) HasPacketLossRate() bool {
if o != nil && !IsNil(o.PacketLossRate) {
return true
}
return false
}
// SetPacketLossRate gets a reference to the given int32 and assigns it to the PacketLossRate field.
func (o *PerformanceDataRecord) SetPacketLossRate(v int32) {
o.PacketLossRate = &v
}
// GetUplinkThroughput returns the UplinkThroughput field value if set, zero value otherwise.
func (o *PerformanceDataRecord) GetUplinkThroughput() string {
if o == nil || IsNil(o.UplinkThroughput) {
var ret string
return ret
}
return *o.UplinkThroughput
}
// GetUplinkThroughputOk returns a tuple with the UplinkThroughput field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceDataRecord) GetUplinkThroughputOk() (*string, bool) {
if o == nil || IsNil(o.UplinkThroughput) {
return nil, false
}
return o.UplinkThroughput, true
}
// HasUplinkThroughput returns a boolean if a field has been set.
func (o *PerformanceDataRecord) HasUplinkThroughput() bool {
if o != nil && !IsNil(o.UplinkThroughput) {
return true
}
return false
}
// SetUplinkThroughput gets a reference to the given string and assigns it to the UplinkThroughput field.
func (o *PerformanceDataRecord) SetUplinkThroughput(v string) {
o.UplinkThroughput = &v
}
// GetDownlinkThrougput returns the DownlinkThrougput field value if set, zero value otherwise.
func (o *PerformanceDataRecord) GetDownlinkThrougput() string {
if o == nil || IsNil(o.DownlinkThrougput) {
var ret string
return ret
}
return *o.DownlinkThrougput
}
// GetDownlinkThrougputOk returns a tuple with the DownlinkThrougput field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceDataRecord) GetDownlinkThrougputOk() (*string, bool) {
if o == nil || IsNil(o.DownlinkThrougput) {
return nil, false
}
return o.DownlinkThrougput, true
}
// HasDownlinkThrougput returns a boolean if a field has been set.
func (o *PerformanceDataRecord) HasDownlinkThrougput() bool {
if o != nil && !IsNil(o.DownlinkThrougput) {
return true
}
return false
}
// SetDownlinkThrougput gets a reference to the given string and assigns it to the DownlinkThrougput field.
func (o *PerformanceDataRecord) SetDownlinkThrougput(v string) {
o.DownlinkThrougput = &v
}
func (o PerformanceDataRecord) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PerformanceDataRecord) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
serializedBaseRecord, errBaseRecord := json.Marshal(o.BaseRecord)
if errBaseRecord != nil {
return map[string]interface{}{}, errBaseRecord
}
errBaseRecord = json.Unmarshal([]byte(serializedBaseRecord), &toSerialize)
if errBaseRecord != nil {
return map[string]interface{}{}, errBaseRecord
}
toSerialize["timeInterval"] = o.TimeInterval
if !IsNil(o.Location) {
toSerialize["location"] = o.Location
}
if !IsNil(o.RemoteEndpoint) {
toSerialize["remoteEndpoint"] = o.RemoteEndpoint
}
if !IsNil(o.PacketDelayBudget) {
toSerialize["packetDelayBudget"] = o.PacketDelayBudget
}
if !IsNil(o.PacketLossRate) {
toSerialize["packetLossRate"] = o.PacketLossRate
}
if !IsNil(o.UplinkThroughput) {
toSerialize["uplinkThroughput"] = o.UplinkThroughput
}
if !IsNil(o.DownlinkThrougput) {
toSerialize["downlinkThrougput"] = o.DownlinkThrougput
}
return toSerialize, nil
}
func (o *PerformanceDataRecord) 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{
"timeInterval",
"timestamp",
}
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)
}
}
varPerformanceDataRecord := _PerformanceDataRecord{}
err = json.Unmarshal(bytes, &varPerformanceDataRecord)
if err != nil {
return err
}
*o = PerformanceDataRecord(varPerformanceDataRecord)
return err
}
type NullablePerformanceDataRecord struct {
value *PerformanceDataRecord
isSet bool
}
func (v NullablePerformanceDataRecord) Get() *PerformanceDataRecord {
return v.value
}
func (v *NullablePerformanceDataRecord) Set(val *PerformanceDataRecord) {
v.value = val
v.isSet = true
}
func (v NullablePerformanceDataRecord) IsSet() bool {
return v.isSet
}
func (v *NullablePerformanceDataRecord) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePerformanceDataRecord(val *PerformanceDataRecord) *NullablePerformanceDataRecord {
return &NullablePerformanceDataRecord{value: val, isSet: true}
}
func (v NullablePerformanceDataRecord) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePerformanceDataRecord) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。