Ai
1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_processing_instruction.go 6.53 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
Nmfaf_3daDataManagement
MFAF 3GPP DCCF Adaptor (3DA) Data Management Service. © 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_Nmfaf_3daDataManagement
import (
"encoding/json"
"fmt"
)
// checks if the ProcessingInstruction type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProcessingInstruction{}
// ProcessingInstruction Contains instructions related to the processing of notifications.
type ProcessingInstruction struct {
EventId NullableDccfEvent `json:"eventId"`
// indicating a time in seconds.
ProcInterval int32 `json:"procInterval"`
// List of event parameter names, and for each event parameter name, respective event parameter values and sets of the attributes to be used in the summarized reports.
ParamProcInstructs []ParameterProcessingInstruction `json:"paramProcInstructs,omitempty"`
}
type _ProcessingInstruction ProcessingInstruction
// NewProcessingInstruction instantiates a new ProcessingInstruction 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 NewProcessingInstruction(eventId NullableDccfEvent, procInterval int32) *ProcessingInstruction {
this := ProcessingInstruction{}
this.EventId = eventId
this.ProcInterval = procInterval
return &this
}
// NewProcessingInstructionWithDefaults instantiates a new ProcessingInstruction 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 NewProcessingInstructionWithDefaults() *ProcessingInstruction {
this := ProcessingInstruction{}
return &this
}
// GetEventId returns the EventId field value
// If the value is explicit nil, the zero value for DccfEvent will be returned
func (o *ProcessingInstruction) GetEventId() DccfEvent {
if o == nil || o.EventId.Get() == nil {
var ret DccfEvent
return ret
}
return *o.EventId.Get()
}
// GetEventIdOk returns a tuple with the EventId field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ProcessingInstruction) GetEventIdOk() (*DccfEvent, bool) {
if o == nil {
return nil, false
}
return o.EventId.Get(), o.EventId.IsSet()
}
// SetEventId sets field value
func (o *ProcessingInstruction) SetEventId(v DccfEvent) {
o.EventId.Set(&v)
}
// GetProcInterval returns the ProcInterval field value
func (o *ProcessingInstruction) GetProcInterval() int32 {
if o == nil {
var ret int32
return ret
}
return o.ProcInterval
}
// GetProcIntervalOk returns a tuple with the ProcInterval field value
// and a boolean to check if the value has been set.
func (o *ProcessingInstruction) GetProcIntervalOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.ProcInterval, true
}
// SetProcInterval sets field value
func (o *ProcessingInstruction) SetProcInterval(v int32) {
o.ProcInterval = v
}
// GetParamProcInstructs returns the ParamProcInstructs field value if set, zero value otherwise.
func (o *ProcessingInstruction) GetParamProcInstructs() []ParameterProcessingInstruction {
if o == nil || IsNil(o.ParamProcInstructs) {
var ret []ParameterProcessingInstruction
return ret
}
return o.ParamProcInstructs
}
// GetParamProcInstructsOk returns a tuple with the ParamProcInstructs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessingInstruction) GetParamProcInstructsOk() ([]ParameterProcessingInstruction, bool) {
if o == nil || IsNil(o.ParamProcInstructs) {
return nil, false
}
return o.ParamProcInstructs, true
}
// HasParamProcInstructs returns a boolean if a field has been set.
func (o *ProcessingInstruction) HasParamProcInstructs() bool {
if o != nil && !IsNil(o.ParamProcInstructs) {
return true
}
return false
}
// SetParamProcInstructs gets a reference to the given []ParameterProcessingInstruction and assigns it to the ParamProcInstructs field.
func (o *ProcessingInstruction) SetParamProcInstructs(v []ParameterProcessingInstruction) {
o.ParamProcInstructs = v
}
func (o ProcessingInstruction) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProcessingInstruction) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["eventId"] = o.EventId.Get()
toSerialize["procInterval"] = o.ProcInterval
if !IsNil(o.ParamProcInstructs) {
toSerialize["paramProcInstructs"] = o.ParamProcInstructs
}
return toSerialize, nil
}
func (o *ProcessingInstruction) 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{
"eventId",
"procInterval",
}
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)
}
}
varProcessingInstruction := _ProcessingInstruction{}
err = json.Unmarshal(bytes, &varProcessingInstruction)
if err != nil {
return err
}
*o = ProcessingInstruction(varProcessingInstruction)
return err
}
type NullableProcessingInstruction struct {
value *ProcessingInstruction
isSet bool
}
func (v NullableProcessingInstruction) Get() *ProcessingInstruction {
return v.value
}
func (v *NullableProcessingInstruction) Set(val *ProcessingInstruction) {
v.value = val
v.isSet = true
}
func (v NullableProcessingInstruction) IsSet() bool {
return v.isSet
}
func (v *NullableProcessingInstruction) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProcessingInstruction(val *ProcessingInstruction) *NullableProcessingInstruction {
return &NullableProcessingInstruction{value: val, isSet: true}
}
func (v NullableProcessingInstruction) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProcessingInstruction) 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

搜索帮助