Files
sdk/model_application_event.go

450 lines
12 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the ApplicationEvent type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ApplicationEvent{}
// ApplicationEvent struct for ApplicationEvent
type ApplicationEvent struct {
Count *int32 `json:"count,omitempty"`
FirstTime *string `json:"firstTime,omitempty"`
InvolvedObject *string `json:"involvedObject,omitempty"`
LastTime *string `json:"lastTime,omitempty"`
Message *string `json:"message,omitempty"`
Name *string `json:"name,omitempty"`
Reason *string `json:"reason,omitempty"`
Source *string `json:"source,omitempty"`
Type *string `json:"type,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ApplicationEvent ApplicationEvent
// NewApplicationEvent instantiates a new ApplicationEvent 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 NewApplicationEvent() *ApplicationEvent {
this := ApplicationEvent{}
return &this
}
// NewApplicationEventWithDefaults instantiates a new ApplicationEvent 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 NewApplicationEventWithDefaults() *ApplicationEvent {
this := ApplicationEvent{}
return &this
}
// GetCount returns the Count field value if set, zero value otherwise.
func (o *ApplicationEvent) GetCount() int32 {
if o == nil || IsNil(o.Count) {
var ret int32
return ret
}
return *o.Count
}
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationEvent) GetCountOk() (*int32, bool) {
if o == nil || IsNil(o.Count) {
return nil, false
}
return o.Count, true
}
// HasCount returns a boolean if a field has been set.
func (o *ApplicationEvent) HasCount() bool {
if o != nil && !IsNil(o.Count) {
return true
}
return false
}
// SetCount gets a reference to the given int32 and assigns it to the Count field.
func (o *ApplicationEvent) SetCount(v int32) {
o.Count = &v
}
// GetFirstTime returns the FirstTime field value if set, zero value otherwise.
func (o *ApplicationEvent) GetFirstTime() string {
if o == nil || IsNil(o.FirstTime) {
var ret string
return ret
}
return *o.FirstTime
}
// GetFirstTimeOk returns a tuple with the FirstTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationEvent) GetFirstTimeOk() (*string, bool) {
if o == nil || IsNil(o.FirstTime) {
return nil, false
}
return o.FirstTime, true
}
// HasFirstTime returns a boolean if a field has been set.
func (o *ApplicationEvent) HasFirstTime() bool {
if o != nil && !IsNil(o.FirstTime) {
return true
}
return false
}
// SetFirstTime gets a reference to the given string and assigns it to the FirstTime field.
func (o *ApplicationEvent) SetFirstTime(v string) {
o.FirstTime = &v
}
// GetInvolvedObject returns the InvolvedObject field value if set, zero value otherwise.
func (o *ApplicationEvent) GetInvolvedObject() string {
if o == nil || IsNil(o.InvolvedObject) {
var ret string
return ret
}
return *o.InvolvedObject
}
// GetInvolvedObjectOk returns a tuple with the InvolvedObject field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationEvent) GetInvolvedObjectOk() (*string, bool) {
if o == nil || IsNil(o.InvolvedObject) {
return nil, false
}
return o.InvolvedObject, true
}
// HasInvolvedObject returns a boolean if a field has been set.
func (o *ApplicationEvent) HasInvolvedObject() bool {
if o != nil && !IsNil(o.InvolvedObject) {
return true
}
return false
}
// SetInvolvedObject gets a reference to the given string and assigns it to the InvolvedObject field.
func (o *ApplicationEvent) SetInvolvedObject(v string) {
o.InvolvedObject = &v
}
// GetLastTime returns the LastTime field value if set, zero value otherwise.
func (o *ApplicationEvent) GetLastTime() string {
if o == nil || IsNil(o.LastTime) {
var ret string
return ret
}
return *o.LastTime
}
// GetLastTimeOk returns a tuple with the LastTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationEvent) GetLastTimeOk() (*string, bool) {
if o == nil || IsNil(o.LastTime) {
return nil, false
}
return o.LastTime, true
}
// HasLastTime returns a boolean if a field has been set.
func (o *ApplicationEvent) HasLastTime() bool {
if o != nil && !IsNil(o.LastTime) {
return true
}
return false
}
// SetLastTime gets a reference to the given string and assigns it to the LastTime field.
func (o *ApplicationEvent) SetLastTime(v string) {
o.LastTime = &v
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *ApplicationEvent) GetMessage() string {
if o == nil || IsNil(o.Message) {
var ret string
return ret
}
return *o.Message
}
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationEvent) GetMessageOk() (*string, bool) {
if o == nil || IsNil(o.Message) {
return nil, false
}
return o.Message, true
}
// HasMessage returns a boolean if a field has been set.
func (o *ApplicationEvent) HasMessage() bool {
if o != nil && !IsNil(o.Message) {
return true
}
return false
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *ApplicationEvent) SetMessage(v string) {
o.Message = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ApplicationEvent) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationEvent) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *ApplicationEvent) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *ApplicationEvent) SetName(v string) {
o.Name = &v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ApplicationEvent) GetReason() string {
if o == nil || IsNil(o.Reason) {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationEvent) GetReasonOk() (*string, bool) {
if o == nil || IsNil(o.Reason) {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *ApplicationEvent) HasReason() bool {
if o != nil && !IsNil(o.Reason) {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *ApplicationEvent) SetReason(v string) {
o.Reason = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *ApplicationEvent) GetSource() string {
if o == nil || IsNil(o.Source) {
var ret string
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationEvent) GetSourceOk() (*string, bool) {
if o == nil || IsNil(o.Source) {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *ApplicationEvent) HasSource() bool {
if o != nil && !IsNil(o.Source) {
return true
}
return false
}
// SetSource gets a reference to the given string and assigns it to the Source field.
func (o *ApplicationEvent) SetSource(v string) {
o.Source = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *ApplicationEvent) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationEvent) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *ApplicationEvent) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *ApplicationEvent) SetType(v string) {
o.Type = &v
}
func (o ApplicationEvent) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ApplicationEvent) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Count) {
toSerialize["count"] = o.Count
}
if !IsNil(o.FirstTime) {
toSerialize["firstTime"] = o.FirstTime
}
if !IsNil(o.InvolvedObject) {
toSerialize["involvedObject"] = o.InvolvedObject
}
if !IsNil(o.LastTime) {
toSerialize["lastTime"] = o.LastTime
}
if !IsNil(o.Message) {
toSerialize["message"] = o.Message
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ApplicationEvent) UnmarshalJSON(data []byte) (err error) {
varApplicationEvent := _ApplicationEvent{}
err = json.Unmarshal(data, &varApplicationEvent)
if err != nil {
return err
}
*o = ApplicationEvent(varApplicationEvent)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "count")
delete(additionalProperties, "firstTime")
delete(additionalProperties, "involvedObject")
delete(additionalProperties, "lastTime")
delete(additionalProperties, "message")
delete(additionalProperties, "name")
delete(additionalProperties, "reason")
delete(additionalProperties, "source")
delete(additionalProperties, "type")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableApplicationEvent struct {
value *ApplicationEvent
isSet bool
}
func (v NullableApplicationEvent) Get() *ApplicationEvent {
return v.value
}
func (v *NullableApplicationEvent) Set(val *ApplicationEvent) {
v.value = val
v.isSet = true
}
func (v NullableApplicationEvent) IsSet() bool {
return v.isSet
}
func (v *NullableApplicationEvent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableApplicationEvent(val *ApplicationEvent) *NullableApplicationEvent {
return &NullableApplicationEvent{value: val, isSet: true}
}
func (v NullableApplicationEvent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableApplicationEvent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}