/* * Subset of Influx API covered by Influx CLI * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package api import ( "encoding/json" "time" ) // Stack struct for Stack type Stack struct { Id string `json:"id" yaml:"id"` OrgID string `json:"orgID" yaml:"orgID"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt"` Events []StackEvent `json:"events" yaml:"events"` } // NewStack instantiates a new Stack 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 NewStack(id string, orgID string, createdAt time.Time, events []StackEvent) *Stack { this := Stack{} this.Id = id this.OrgID = orgID this.CreatedAt = createdAt this.Events = events return &this } // NewStackWithDefaults instantiates a new Stack 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 NewStackWithDefaults() *Stack { this := Stack{} return &this } // GetId returns the Id field value func (o *Stack) GetId() string { if o == nil { var ret string return ret } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. func (o *Stack) GetIdOk() (*string, bool) { if o == nil { return nil, false } return &o.Id, true } // SetId sets field value func (o *Stack) SetId(v string) { o.Id = v } // GetOrgID returns the OrgID field value func (o *Stack) GetOrgID() string { if o == nil { var ret string return ret } return o.OrgID } // GetOrgIDOk returns a tuple with the OrgID field value // and a boolean to check if the value has been set. func (o *Stack) GetOrgIDOk() (*string, bool) { if o == nil { return nil, false } return &o.OrgID, true } // SetOrgID sets field value func (o *Stack) SetOrgID(v string) { o.OrgID = v } // GetCreatedAt returns the CreatedAt field value func (o *Stack) GetCreatedAt() time.Time { if o == nil { var ret time.Time return ret } return o.CreatedAt } // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. func (o *Stack) GetCreatedAtOk() (*time.Time, bool) { if o == nil { return nil, false } return &o.CreatedAt, true } // SetCreatedAt sets field value func (o *Stack) SetCreatedAt(v time.Time) { o.CreatedAt = v } // GetEvents returns the Events field value func (o *Stack) GetEvents() []StackEvent { if o == nil { var ret []StackEvent return ret } return o.Events } // GetEventsOk returns a tuple with the Events field value // and a boolean to check if the value has been set. func (o *Stack) GetEventsOk() (*[]StackEvent, bool) { if o == nil { return nil, false } return &o.Events, true } // SetEvents sets field value func (o *Stack) SetEvents(v []StackEvent) { o.Events = v } func (o Stack) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["id"] = o.Id } if true { toSerialize["orgID"] = o.OrgID } if true { toSerialize["createdAt"] = o.CreatedAt } if true { toSerialize["events"] = o.Events } return json.Marshal(toSerialize) } type NullableStack struct { value *Stack isSet bool } func (v NullableStack) Get() *Stack { return v.value } func (v *NullableStack) Set(val *Stack) { v.value = val v.isSet = true } func (v NullableStack) IsSet() bool { return v.isSet } func (v *NullableStack) Unset() { v.value = nil v.isSet = false } func NewNullableStack(val *Stack) *NullableStack { return &NullableStack{value: val, isSet: true} } func (v NullableStack) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableStack) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }