Files
openapi-go-answer/model_schema_get_object_timeline_resp.go
2023-09-26 16:20:01 +08:00

161 lines
4.8 KiB
Go

/*
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package answer_sdk
import (
"encoding/json"
)
// checks if the SchemaGetObjectTimelineResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaGetObjectTimelineResp{}
// SchemaGetObjectTimelineResp struct for SchemaGetObjectTimelineResp
type SchemaGetObjectTimelineResp struct {
ObjectInfo *SchemaActObjectInfo `json:"object_info,omitempty"`
Timeline []SchemaActObjectTimeline `json:"timeline,omitempty"`
}
// NewSchemaGetObjectTimelineResp instantiates a new SchemaGetObjectTimelineResp 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 NewSchemaGetObjectTimelineResp() *SchemaGetObjectTimelineResp {
this := SchemaGetObjectTimelineResp{}
return &this
}
// NewSchemaGetObjectTimelineRespWithDefaults instantiates a new SchemaGetObjectTimelineResp 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 NewSchemaGetObjectTimelineRespWithDefaults() *SchemaGetObjectTimelineResp {
this := SchemaGetObjectTimelineResp{}
return &this
}
// GetObjectInfo returns the ObjectInfo field value if set, zero value otherwise.
func (o *SchemaGetObjectTimelineResp) GetObjectInfo() SchemaActObjectInfo {
if o == nil || IsNil(o.ObjectInfo) {
var ret SchemaActObjectInfo
return ret
}
return *o.ObjectInfo
}
// GetObjectInfoOk returns a tuple with the ObjectInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaGetObjectTimelineResp) GetObjectInfoOk() (*SchemaActObjectInfo, bool) {
if o == nil || IsNil(o.ObjectInfo) {
return nil, false
}
return o.ObjectInfo, true
}
// HasObjectInfo returns a boolean if a field has been set.
func (o *SchemaGetObjectTimelineResp) HasObjectInfo() bool {
if o != nil && !IsNil(o.ObjectInfo) {
return true
}
return false
}
// SetObjectInfo gets a reference to the given SchemaActObjectInfo and assigns it to the ObjectInfo field.
func (o *SchemaGetObjectTimelineResp) SetObjectInfo(v SchemaActObjectInfo) {
o.ObjectInfo = &v
}
// GetTimeline returns the Timeline field value if set, zero value otherwise.
func (o *SchemaGetObjectTimelineResp) GetTimeline() []SchemaActObjectTimeline {
if o == nil || IsNil(o.Timeline) {
var ret []SchemaActObjectTimeline
return ret
}
return o.Timeline
}
// GetTimelineOk returns a tuple with the Timeline field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaGetObjectTimelineResp) GetTimelineOk() ([]SchemaActObjectTimeline, bool) {
if o == nil || IsNil(o.Timeline) {
return nil, false
}
return o.Timeline, true
}
// HasTimeline returns a boolean if a field has been set.
func (o *SchemaGetObjectTimelineResp) HasTimeline() bool {
if o != nil && !IsNil(o.Timeline) {
return true
}
return false
}
// SetTimeline gets a reference to the given []SchemaActObjectTimeline and assigns it to the Timeline field.
func (o *SchemaGetObjectTimelineResp) SetTimeline(v []SchemaActObjectTimeline) {
o.Timeline = v
}
func (o SchemaGetObjectTimelineResp) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaGetObjectTimelineResp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ObjectInfo) {
toSerialize["object_info"] = o.ObjectInfo
}
if !IsNil(o.Timeline) {
toSerialize["timeline"] = o.Timeline
}
return toSerialize, nil
}
type NullableSchemaGetObjectTimelineResp struct {
value *SchemaGetObjectTimelineResp
isSet bool
}
func (v NullableSchemaGetObjectTimelineResp) Get() *SchemaGetObjectTimelineResp {
return v.value
}
func (v *NullableSchemaGetObjectTimelineResp) Set(val *SchemaGetObjectTimelineResp) {
v.value = val
v.isSet = true
}
func (v NullableSchemaGetObjectTimelineResp) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaGetObjectTimelineResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaGetObjectTimelineResp(val *SchemaGetObjectTimelineResp) *NullableSchemaGetObjectTimelineResp {
return &NullableSchemaGetObjectTimelineResp{value: val, isSet: true}
}
func (v NullableSchemaGetObjectTimelineResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaGetObjectTimelineResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}