mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
302 lines
7.9 KiB
Go
302 lines
7.9 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 InsightsEvent type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &InsightsEvent{}
|
|
|
|
// InsightsEvent struct for InsightsEvent
|
|
type InsightsEvent struct {
|
|
DistinctId *string `json:"distinct_id,omitempty"`
|
|
Event *string `json:"event,omitempty"`
|
|
Properties map[string]interface{} `json:"properties,omitempty"`
|
|
Timestamp *string `json:"timestamp,omitempty"`
|
|
Uuid *string `json:"uuid,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _InsightsEvent InsightsEvent
|
|
|
|
// NewInsightsEvent instantiates a new InsightsEvent 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 NewInsightsEvent() *InsightsEvent {
|
|
this := InsightsEvent{}
|
|
return &this
|
|
}
|
|
|
|
// NewInsightsEventWithDefaults instantiates a new InsightsEvent 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 NewInsightsEventWithDefaults() *InsightsEvent {
|
|
this := InsightsEvent{}
|
|
return &this
|
|
}
|
|
|
|
// GetDistinctId returns the DistinctId field value if set, zero value otherwise.
|
|
func (o *InsightsEvent) GetDistinctId() string {
|
|
if o == nil || IsNil(o.DistinctId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DistinctId
|
|
}
|
|
|
|
// GetDistinctIdOk returns a tuple with the DistinctId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsightsEvent) GetDistinctIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DistinctId) {
|
|
return nil, false
|
|
}
|
|
return o.DistinctId, true
|
|
}
|
|
|
|
// HasDistinctId returns a boolean if a field has been set.
|
|
func (o *InsightsEvent) HasDistinctId() bool {
|
|
if o != nil && !IsNil(o.DistinctId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDistinctId gets a reference to the given string and assigns it to the DistinctId field.
|
|
func (o *InsightsEvent) SetDistinctId(v string) {
|
|
o.DistinctId = &v
|
|
}
|
|
|
|
// GetEvent returns the Event field value if set, zero value otherwise.
|
|
func (o *InsightsEvent) GetEvent() string {
|
|
if o == nil || IsNil(o.Event) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Event
|
|
}
|
|
|
|
// GetEventOk returns a tuple with the Event field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsightsEvent) GetEventOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Event) {
|
|
return nil, false
|
|
}
|
|
return o.Event, true
|
|
}
|
|
|
|
// HasEvent returns a boolean if a field has been set.
|
|
func (o *InsightsEvent) HasEvent() bool {
|
|
if o != nil && !IsNil(o.Event) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEvent gets a reference to the given string and assigns it to the Event field.
|
|
func (o *InsightsEvent) SetEvent(v string) {
|
|
o.Event = &v
|
|
}
|
|
|
|
// GetProperties returns the Properties field value if set, zero value otherwise.
|
|
func (o *InsightsEvent) GetProperties() map[string]interface{} {
|
|
if o == nil || IsNil(o.Properties) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.Properties
|
|
}
|
|
|
|
// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsightsEvent) GetPropertiesOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Properties) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.Properties, true
|
|
}
|
|
|
|
// HasProperties returns a boolean if a field has been set.
|
|
func (o *InsightsEvent) HasProperties() bool {
|
|
if o != nil && !IsNil(o.Properties) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProperties gets a reference to the given map[string]interface{} and assigns it to the Properties field.
|
|
func (o *InsightsEvent) SetProperties(v map[string]interface{}) {
|
|
o.Properties = v
|
|
}
|
|
|
|
// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
|
|
func (o *InsightsEvent) GetTimestamp() string {
|
|
if o == nil || IsNil(o.Timestamp) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Timestamp
|
|
}
|
|
|
|
// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsightsEvent) GetTimestampOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Timestamp) {
|
|
return nil, false
|
|
}
|
|
return o.Timestamp, true
|
|
}
|
|
|
|
// HasTimestamp returns a boolean if a field has been set.
|
|
func (o *InsightsEvent) HasTimestamp() bool {
|
|
if o != nil && !IsNil(o.Timestamp) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field.
|
|
func (o *InsightsEvent) SetTimestamp(v string) {
|
|
o.Timestamp = &v
|
|
}
|
|
|
|
// GetUuid returns the Uuid field value if set, zero value otherwise.
|
|
func (o *InsightsEvent) GetUuid() string {
|
|
if o == nil || IsNil(o.Uuid) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Uuid
|
|
}
|
|
|
|
// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsightsEvent) GetUuidOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Uuid) {
|
|
return nil, false
|
|
}
|
|
return o.Uuid, true
|
|
}
|
|
|
|
// HasUuid returns a boolean if a field has been set.
|
|
func (o *InsightsEvent) HasUuid() bool {
|
|
if o != nil && !IsNil(o.Uuid) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUuid gets a reference to the given string and assigns it to the Uuid field.
|
|
func (o *InsightsEvent) SetUuid(v string) {
|
|
o.Uuid = &v
|
|
}
|
|
|
|
func (o InsightsEvent) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o InsightsEvent) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.DistinctId) {
|
|
toSerialize["distinct_id"] = o.DistinctId
|
|
}
|
|
if !IsNil(o.Event) {
|
|
toSerialize["event"] = o.Event
|
|
}
|
|
if !IsNil(o.Properties) {
|
|
toSerialize["properties"] = o.Properties
|
|
}
|
|
if !IsNil(o.Timestamp) {
|
|
toSerialize["timestamp"] = o.Timestamp
|
|
}
|
|
if !IsNil(o.Uuid) {
|
|
toSerialize["uuid"] = o.Uuid
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *InsightsEvent) UnmarshalJSON(data []byte) (err error) {
|
|
varInsightsEvent := _InsightsEvent{}
|
|
|
|
err = json.Unmarshal(data, &varInsightsEvent)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = InsightsEvent(varInsightsEvent)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "distinct_id")
|
|
delete(additionalProperties, "event")
|
|
delete(additionalProperties, "properties")
|
|
delete(additionalProperties, "timestamp")
|
|
delete(additionalProperties, "uuid")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableInsightsEvent struct {
|
|
value *InsightsEvent
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableInsightsEvent) Get() *InsightsEvent {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableInsightsEvent) Set(val *InsightsEvent) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableInsightsEvent) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableInsightsEvent) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableInsightsEvent(val *InsightsEvent) *NullableInsightsEvent {
|
|
return &NullableInsightsEvent{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableInsightsEvent) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableInsightsEvent) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|