Files
sdk/model_event_captured_error.go

573 lines
16 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 EventCapturedError type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EventCapturedError{}
// EventCapturedError struct for EventCapturedError
type EventCapturedError struct {
// DistinctID is the person/visitor the error is attributed to. Omitted when the row carries none.
DistinctId *string `json:"distinctId,omitempty"`
// Event is the event name the error was stored under, e.g. $error.
Event *string `json:"event,omitempty"`
Exception interface{} `json:"exception,omitempty"`
// ID is the row's stable event id — the client's own idempotency id when it sent one, else the server-minted one.
Id *string `json:"id,omitempty"`
// Library is the client SDK that reported the error. Omitted when absent.
Library *string `json:"library,omitempty"`
// LibraryVer is that SDK's version. Omitted when absent.
LibraryVersion *string `json:"libraryVersion,omitempty"`
// Path is the URL's path component. Omitted when absent.
Path *string `json:"path,omitempty"`
// Product is the surface that emitted the error. Omitted when absent.
Product *string `json:"product,omitempty"`
Properties interface{} `json:"properties,omitempty"`
// SessionID groups the events of one visit. Omitted when the client sent none.
SessionId *string `json:"sessionId,omitempty"`
// Timestamp is when the error was captured, RFC3339 UTC.
Timestamp *string `json:"timestamp,omitempty"`
// URL is the full page address the error fired on. Omitted when absent.
Url *string `json:"url,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EventCapturedError EventCapturedError
// NewEventCapturedError instantiates a new EventCapturedError 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 NewEventCapturedError() *EventCapturedError {
this := EventCapturedError{}
return &this
}
// NewEventCapturedErrorWithDefaults instantiates a new EventCapturedError 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 NewEventCapturedErrorWithDefaults() *EventCapturedError {
this := EventCapturedError{}
return &this
}
// GetDistinctId returns the DistinctId field value if set, zero value otherwise.
func (o *EventCapturedError) 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 *EventCapturedError) 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 *EventCapturedError) 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 *EventCapturedError) SetDistinctId(v string) {
o.DistinctId = &v
}
// GetEvent returns the Event field value if set, zero value otherwise.
func (o *EventCapturedError) 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 *EventCapturedError) 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 *EventCapturedError) 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 *EventCapturedError) SetEvent(v string) {
o.Event = &v
}
// GetException returns the Exception field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EventCapturedError) GetException() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Exception
}
// GetExceptionOk returns a tuple with the Exception field value if set, nil otherwise
// 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 *EventCapturedError) GetExceptionOk() (*interface{}, bool) {
if o == nil || IsNil(o.Exception) {
return nil, false
}
return &o.Exception, true
}
// HasException returns a boolean if a field has been set.
func (o *EventCapturedError) HasException() bool {
if o != nil && !IsNil(o.Exception) {
return true
}
return false
}
// SetException gets a reference to the given interface{} and assigns it to the Exception field.
func (o *EventCapturedError) SetException(v interface{}) {
o.Exception = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *EventCapturedError) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventCapturedError) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *EventCapturedError) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *EventCapturedError) SetId(v string) {
o.Id = &v
}
// GetLibrary returns the Library field value if set, zero value otherwise.
func (o *EventCapturedError) GetLibrary() string {
if o == nil || IsNil(o.Library) {
var ret string
return ret
}
return *o.Library
}
// GetLibraryOk returns a tuple with the Library field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventCapturedError) GetLibraryOk() (*string, bool) {
if o == nil || IsNil(o.Library) {
return nil, false
}
return o.Library, true
}
// HasLibrary returns a boolean if a field has been set.
func (o *EventCapturedError) HasLibrary() bool {
if o != nil && !IsNil(o.Library) {
return true
}
return false
}
// SetLibrary gets a reference to the given string and assigns it to the Library field.
func (o *EventCapturedError) SetLibrary(v string) {
o.Library = &v
}
// GetLibraryVersion returns the LibraryVersion field value if set, zero value otherwise.
func (o *EventCapturedError) GetLibraryVersion() string {
if o == nil || IsNil(o.LibraryVersion) {
var ret string
return ret
}
return *o.LibraryVersion
}
// GetLibraryVersionOk returns a tuple with the LibraryVersion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventCapturedError) GetLibraryVersionOk() (*string, bool) {
if o == nil || IsNil(o.LibraryVersion) {
return nil, false
}
return o.LibraryVersion, true
}
// HasLibraryVersion returns a boolean if a field has been set.
func (o *EventCapturedError) HasLibraryVersion() bool {
if o != nil && !IsNil(o.LibraryVersion) {
return true
}
return false
}
// SetLibraryVersion gets a reference to the given string and assigns it to the LibraryVersion field.
func (o *EventCapturedError) SetLibraryVersion(v string) {
o.LibraryVersion = &v
}
// GetPath returns the Path field value if set, zero value otherwise.
func (o *EventCapturedError) GetPath() string {
if o == nil || IsNil(o.Path) {
var ret string
return ret
}
return *o.Path
}
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventCapturedError) GetPathOk() (*string, bool) {
if o == nil || IsNil(o.Path) {
return nil, false
}
return o.Path, true
}
// HasPath returns a boolean if a field has been set.
func (o *EventCapturedError) HasPath() bool {
if o != nil && !IsNil(o.Path) {
return true
}
return false
}
// SetPath gets a reference to the given string and assigns it to the Path field.
func (o *EventCapturedError) SetPath(v string) {
o.Path = &v
}
// GetProduct returns the Product field value if set, zero value otherwise.
func (o *EventCapturedError) GetProduct() string {
if o == nil || IsNil(o.Product) {
var ret string
return ret
}
return *o.Product
}
// GetProductOk returns a tuple with the Product field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventCapturedError) GetProductOk() (*string, bool) {
if o == nil || IsNil(o.Product) {
return nil, false
}
return o.Product, true
}
// HasProduct returns a boolean if a field has been set.
func (o *EventCapturedError) HasProduct() bool {
if o != nil && !IsNil(o.Product) {
return true
}
return false
}
// SetProduct gets a reference to the given string and assigns it to the Product field.
func (o *EventCapturedError) SetProduct(v string) {
o.Product = &v
}
// GetProperties returns the Properties field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EventCapturedError) GetProperties() interface{} {
if o == nil {
var ret 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.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *EventCapturedError) GetPropertiesOk() (*interface{}, bool) {
if o == nil || IsNil(o.Properties) {
return nil, false
}
return &o.Properties, true
}
// HasProperties returns a boolean if a field has been set.
func (o *EventCapturedError) HasProperties() bool {
if o != nil && !IsNil(o.Properties) {
return true
}
return false
}
// SetProperties gets a reference to the given interface{} and assigns it to the Properties field.
func (o *EventCapturedError) SetProperties(v interface{}) {
o.Properties = v
}
// GetSessionId returns the SessionId field value if set, zero value otherwise.
func (o *EventCapturedError) GetSessionId() string {
if o == nil || IsNil(o.SessionId) {
var ret string
return ret
}
return *o.SessionId
}
// GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventCapturedError) GetSessionIdOk() (*string, bool) {
if o == nil || IsNil(o.SessionId) {
return nil, false
}
return o.SessionId, true
}
// HasSessionId returns a boolean if a field has been set.
func (o *EventCapturedError) HasSessionId() bool {
if o != nil && !IsNil(o.SessionId) {
return true
}
return false
}
// SetSessionId gets a reference to the given string and assigns it to the SessionId field.
func (o *EventCapturedError) SetSessionId(v string) {
o.SessionId = &v
}
// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
func (o *EventCapturedError) 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 *EventCapturedError) 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 *EventCapturedError) 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 *EventCapturedError) SetTimestamp(v string) {
o.Timestamp = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *EventCapturedError) GetUrl() string {
if o == nil || IsNil(o.Url) {
var ret string
return ret
}
return *o.Url
}
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventCapturedError) GetUrlOk() (*string, bool) {
if o == nil || IsNil(o.Url) {
return nil, false
}
return o.Url, true
}
// HasUrl returns a boolean if a field has been set.
func (o *EventCapturedError) HasUrl() bool {
if o != nil && !IsNil(o.Url) {
return true
}
return false
}
// SetUrl gets a reference to the given string and assigns it to the Url field.
func (o *EventCapturedError) SetUrl(v string) {
o.Url = &v
}
func (o EventCapturedError) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EventCapturedError) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DistinctId) {
toSerialize["distinctId"] = o.DistinctId
}
if !IsNil(o.Event) {
toSerialize["event"] = o.Event
}
if o.Exception != nil {
toSerialize["exception"] = o.Exception
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Library) {
toSerialize["library"] = o.Library
}
if !IsNil(o.LibraryVersion) {
toSerialize["libraryVersion"] = o.LibraryVersion
}
if !IsNil(o.Path) {
toSerialize["path"] = o.Path
}
if !IsNil(o.Product) {
toSerialize["product"] = o.Product
}
if o.Properties != nil {
toSerialize["properties"] = o.Properties
}
if !IsNil(o.SessionId) {
toSerialize["sessionId"] = o.SessionId
}
if !IsNil(o.Timestamp) {
toSerialize["timestamp"] = o.Timestamp
}
if !IsNil(o.Url) {
toSerialize["url"] = o.Url
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EventCapturedError) UnmarshalJSON(data []byte) (err error) {
varEventCapturedError := _EventCapturedError{}
err = json.Unmarshal(data, &varEventCapturedError)
if err != nil {
return err
}
*o = EventCapturedError(varEventCapturedError)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "distinctId")
delete(additionalProperties, "event")
delete(additionalProperties, "exception")
delete(additionalProperties, "id")
delete(additionalProperties, "library")
delete(additionalProperties, "libraryVersion")
delete(additionalProperties, "path")
delete(additionalProperties, "product")
delete(additionalProperties, "properties")
delete(additionalProperties, "sessionId")
delete(additionalProperties, "timestamp")
delete(additionalProperties, "url")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEventCapturedError struct {
value *EventCapturedError
isSet bool
}
func (v NullableEventCapturedError) Get() *EventCapturedError {
return v.value
}
func (v *NullableEventCapturedError) Set(val *EventCapturedError) {
v.value = val
v.isSet = true
}
func (v NullableEventCapturedError) IsSet() bool {
return v.isSet
}
func (v *NullableEventCapturedError) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEventCapturedError(val *EventCapturedError) *NullableEventCapturedError {
return &NullableEventCapturedError{value: val, isSet: true}
}
func (v NullableEventCapturedError) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEventCapturedError) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}