1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_data_report.go 13.03 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2年前 . update
/*
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"
)
// checks if the DataReport type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DataReport{}
// DataReport A data report sent by a data collection client to the Data Collection AF.
type DataReport struct {
// String providing an application identifier.
ExternalApplicationId string `json:"externalApplicationId"`
ServiceExperienceRecords []ServiceExperienceRecord `json:"serviceExperienceRecords,omitempty"`
LocationRecords []LocationRecord `json:"locationRecords,omitempty"`
CommunicationRecords []CommunicationRecord `json:"communicationRecords,omitempty"`
PerformanceDataRecords []PerformanceDataRecord `json:"performanceDataRecords,omitempty"`
ApplicationSpecificRecords []ApplicationSpecificRecord `json:"applicationSpecificRecords,omitempty"`
TripPlanRecords []TripPlanRecord `json:"tripPlanRecords,omitempty"`
MediaStreamingAccessRecords []MediaStreamingAccessRecord `json:"mediaStreamingAccessRecords,omitempty"`
}
type _DataReport DataReport
// NewDataReport instantiates a new DataReport 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 NewDataReport(externalApplicationId string) *DataReport {
this := DataReport{}
this.ExternalApplicationId = externalApplicationId
return &this
}
// NewDataReportWithDefaults instantiates a new DataReport 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 NewDataReportWithDefaults() *DataReport {
this := DataReport{}
return &this
}
// GetExternalApplicationId returns the ExternalApplicationId field value
func (o *DataReport) GetExternalApplicationId() string {
if o == nil {
var ret string
return ret
}
return o.ExternalApplicationId
}
// GetExternalApplicationIdOk returns a tuple with the ExternalApplicationId field value
// and a boolean to check if the value has been set.
func (o *DataReport) GetExternalApplicationIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ExternalApplicationId, true
}
// SetExternalApplicationId sets field value
func (o *DataReport) SetExternalApplicationId(v string) {
o.ExternalApplicationId = v
}
// GetServiceExperienceRecords returns the ServiceExperienceRecords field value if set, zero value otherwise.
func (o *DataReport) GetServiceExperienceRecords() []ServiceExperienceRecord {
if o == nil || IsNil(o.ServiceExperienceRecords) {
var ret []ServiceExperienceRecord
return ret
}
return o.ServiceExperienceRecords
}
// GetServiceExperienceRecordsOk returns a tuple with the ServiceExperienceRecords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataReport) GetServiceExperienceRecordsOk() ([]ServiceExperienceRecord, bool) {
if o == nil || IsNil(o.ServiceExperienceRecords) {
return nil, false
}
return o.ServiceExperienceRecords, true
}
// HasServiceExperienceRecords returns a boolean if a field has been set.
func (o *DataReport) HasServiceExperienceRecords() bool {
if o != nil && !IsNil(o.ServiceExperienceRecords) {
return true
}
return false
}
// SetServiceExperienceRecords gets a reference to the given []ServiceExperienceRecord and assigns it to the ServiceExperienceRecords field.
func (o *DataReport) SetServiceExperienceRecords(v []ServiceExperienceRecord) {
o.ServiceExperienceRecords = v
}
// GetLocationRecords returns the LocationRecords field value if set, zero value otherwise.
func (o *DataReport) GetLocationRecords() []LocationRecord {
if o == nil || IsNil(o.LocationRecords) {
var ret []LocationRecord
return ret
}
return o.LocationRecords
}
// GetLocationRecordsOk returns a tuple with the LocationRecords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataReport) GetLocationRecordsOk() ([]LocationRecord, bool) {
if o == nil || IsNil(o.LocationRecords) {
return nil, false
}
return o.LocationRecords, true
}
// HasLocationRecords returns a boolean if a field has been set.
func (o *DataReport) HasLocationRecords() bool {
if o != nil && !IsNil(o.LocationRecords) {
return true
}
return false
}
// SetLocationRecords gets a reference to the given []LocationRecord and assigns it to the LocationRecords field.
func (o *DataReport) SetLocationRecords(v []LocationRecord) {
o.LocationRecords = v
}
// GetCommunicationRecords returns the CommunicationRecords field value if set, zero value otherwise.
func (o *DataReport) GetCommunicationRecords() []CommunicationRecord {
if o == nil || IsNil(o.CommunicationRecords) {
var ret []CommunicationRecord
return ret
}
return o.CommunicationRecords
}
// GetCommunicationRecordsOk returns a tuple with the CommunicationRecords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataReport) GetCommunicationRecordsOk() ([]CommunicationRecord, bool) {
if o == nil || IsNil(o.CommunicationRecords) {
return nil, false
}
return o.CommunicationRecords, true
}
// HasCommunicationRecords returns a boolean if a field has been set.
func (o *DataReport) HasCommunicationRecords() bool {
if o != nil && !IsNil(o.CommunicationRecords) {
return true
}
return false
}
// SetCommunicationRecords gets a reference to the given []CommunicationRecord and assigns it to the CommunicationRecords field.
func (o *DataReport) SetCommunicationRecords(v []CommunicationRecord) {
o.CommunicationRecords = v
}
// GetPerformanceDataRecords returns the PerformanceDataRecords field value if set, zero value otherwise.
func (o *DataReport) GetPerformanceDataRecords() []PerformanceDataRecord {
if o == nil || IsNil(o.PerformanceDataRecords) {
var ret []PerformanceDataRecord
return ret
}
return o.PerformanceDataRecords
}
// GetPerformanceDataRecordsOk returns a tuple with the PerformanceDataRecords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataReport) GetPerformanceDataRecordsOk() ([]PerformanceDataRecord, bool) {
if o == nil || IsNil(o.PerformanceDataRecords) {
return nil, false
}
return o.PerformanceDataRecords, true
}
// HasPerformanceDataRecords returns a boolean if a field has been set.
func (o *DataReport) HasPerformanceDataRecords() bool {
if o != nil && !IsNil(o.PerformanceDataRecords) {
return true
}
return false
}
// SetPerformanceDataRecords gets a reference to the given []PerformanceDataRecord and assigns it to the PerformanceDataRecords field.
func (o *DataReport) SetPerformanceDataRecords(v []PerformanceDataRecord) {
o.PerformanceDataRecords = v
}
// GetApplicationSpecificRecords returns the ApplicationSpecificRecords field value if set, zero value otherwise.
func (o *DataReport) GetApplicationSpecificRecords() []ApplicationSpecificRecord {
if o == nil || IsNil(o.ApplicationSpecificRecords) {
var ret []ApplicationSpecificRecord
return ret
}
return o.ApplicationSpecificRecords
}
// GetApplicationSpecificRecordsOk returns a tuple with the ApplicationSpecificRecords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataReport) GetApplicationSpecificRecordsOk() ([]ApplicationSpecificRecord, bool) {
if o == nil || IsNil(o.ApplicationSpecificRecords) {
return nil, false
}
return o.ApplicationSpecificRecords, true
}
// HasApplicationSpecificRecords returns a boolean if a field has been set.
func (o *DataReport) HasApplicationSpecificRecords() bool {
if o != nil && !IsNil(o.ApplicationSpecificRecords) {
return true
}
return false
}
// SetApplicationSpecificRecords gets a reference to the given []ApplicationSpecificRecord and assigns it to the ApplicationSpecificRecords field.
func (o *DataReport) SetApplicationSpecificRecords(v []ApplicationSpecificRecord) {
o.ApplicationSpecificRecords = v
}
// GetTripPlanRecords returns the TripPlanRecords field value if set, zero value otherwise.
func (o *DataReport) GetTripPlanRecords() []TripPlanRecord {
if o == nil || IsNil(o.TripPlanRecords) {
var ret []TripPlanRecord
return ret
}
return o.TripPlanRecords
}
// GetTripPlanRecordsOk returns a tuple with the TripPlanRecords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataReport) GetTripPlanRecordsOk() ([]TripPlanRecord, bool) {
if o == nil || IsNil(o.TripPlanRecords) {
return nil, false
}
return o.TripPlanRecords, true
}
// HasTripPlanRecords returns a boolean if a field has been set.
func (o *DataReport) HasTripPlanRecords() bool {
if o != nil && !IsNil(o.TripPlanRecords) {
return true
}
return false
}
// SetTripPlanRecords gets a reference to the given []TripPlanRecord and assigns it to the TripPlanRecords field.
func (o *DataReport) SetTripPlanRecords(v []TripPlanRecord) {
o.TripPlanRecords = v
}
// GetMediaStreamingAccessRecords returns the MediaStreamingAccessRecords field value if set, zero value otherwise.
func (o *DataReport) GetMediaStreamingAccessRecords() []MediaStreamingAccessRecord {
if o == nil || IsNil(o.MediaStreamingAccessRecords) {
var ret []MediaStreamingAccessRecord
return ret
}
return o.MediaStreamingAccessRecords
}
// GetMediaStreamingAccessRecordsOk returns a tuple with the MediaStreamingAccessRecords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataReport) GetMediaStreamingAccessRecordsOk() ([]MediaStreamingAccessRecord, bool) {
if o == nil || IsNil(o.MediaStreamingAccessRecords) {
return nil, false
}
return o.MediaStreamingAccessRecords, true
}
// HasMediaStreamingAccessRecords returns a boolean if a field has been set.
func (o *DataReport) HasMediaStreamingAccessRecords() bool {
if o != nil && !IsNil(o.MediaStreamingAccessRecords) {
return true
}
return false
}
// SetMediaStreamingAccessRecords gets a reference to the given []MediaStreamingAccessRecord and assigns it to the MediaStreamingAccessRecords field.
func (o *DataReport) SetMediaStreamingAccessRecords(v []MediaStreamingAccessRecord) {
o.MediaStreamingAccessRecords = v
}
func (o DataReport) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DataReport) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["externalApplicationId"] = o.ExternalApplicationId
if !IsNil(o.ServiceExperienceRecords) {
toSerialize["serviceExperienceRecords"] = o.ServiceExperienceRecords
}
if !IsNil(o.LocationRecords) {
toSerialize["locationRecords"] = o.LocationRecords
}
if !IsNil(o.CommunicationRecords) {
toSerialize["communicationRecords"] = o.CommunicationRecords
}
if !IsNil(o.PerformanceDataRecords) {
toSerialize["performanceDataRecords"] = o.PerformanceDataRecords
}
if !IsNil(o.ApplicationSpecificRecords) {
toSerialize["applicationSpecificRecords"] = o.ApplicationSpecificRecords
}
if !IsNil(o.TripPlanRecords) {
toSerialize["tripPlanRecords"] = o.TripPlanRecords
}
if !IsNil(o.MediaStreamingAccessRecords) {
toSerialize["mediaStreamingAccessRecords"] = o.MediaStreamingAccessRecords
}
return toSerialize, nil
}
func (o *DataReport) 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{
"externalApplicationId",
}
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)
}
}
varDataReport := _DataReport{}
err = json.Unmarshal(bytes, &varDataReport)
if err != nil {
return err
}
*o = DataReport(varDataReport)
return err
}
type NullableDataReport struct {
value *DataReport
isSet bool
}
func (v NullableDataReport) Get() *DataReport {
return v.value
}
func (v *NullableDataReport) Set(val *DataReport) {
v.value = val
v.isSet = true
}
func (v NullableDataReport) IsSet() bool {
return v.isSet
}
func (v *NullableDataReport) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDataReport(val *DataReport) *NullableDataReport {
return &NullableDataReport{value: val, isSet: true}
}
func (v NullableDataReport) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDataReport) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助