Files
sdk/model_esign_esign_event.go

345 lines
8.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 EsignEsignEvent type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EsignEsignEvent{}
// EsignEsignEvent struct for EsignEsignEvent
type EsignEsignEvent struct {
// CreatedAt is when it happened, in unix milliseconds.
CreatedAt *int64 `json:"createdAt,omitempty"`
Data interface{} `json:"data,omitempty"`
// Email is the email of whoever caused it, null for an event with no actor — the sender's own calls are recorded without one.
Email *string `json:"email,omitempty"`
// ID is the entry id.
Id *string `json:"id,omitempty"`
// Name is the name of whoever caused it, null when it was not recorded.
Name *string `json:"name,omitempty"`
// Type is what happened: DOCUMENT_CREATED, RECIPIENT_CREATED, FIELD_CREATED, DOCUMENT_SENT, DOCUMENT_OPENED, DOCUMENT_FIELD_INSERTED, DOCUMENT_RECIPIENT_COMPLETED, DOCUMENT_RECIPIENT_REJECTED or DOCUMENT_COMPLETED.
Type *string `json:"type,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EsignEsignEvent EsignEsignEvent
// NewEsignEsignEvent instantiates a new EsignEsignEvent 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 NewEsignEsignEvent() *EsignEsignEvent {
this := EsignEsignEvent{}
return &this
}
// NewEsignEsignEventWithDefaults instantiates a new EsignEsignEvent 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 NewEsignEsignEventWithDefaults() *EsignEsignEvent {
this := EsignEsignEvent{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *EsignEsignEvent) GetCreatedAt() int64 {
if o == nil || IsNil(o.CreatedAt) {
var ret int64
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EsignEsignEvent) GetCreatedAtOk() (*int64, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *EsignEsignEvent) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
func (o *EsignEsignEvent) SetCreatedAt(v int64) {
o.CreatedAt = &v
}
// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EsignEsignEvent) GetData() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Data
}
// GetDataOk returns a tuple with the Data 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 *EsignEsignEvent) GetDataOk() (*interface{}, bool) {
if o == nil || IsNil(o.Data) {
return nil, false
}
return &o.Data, true
}
// HasData returns a boolean if a field has been set.
func (o *EsignEsignEvent) HasData() bool {
if o != nil && !IsNil(o.Data) {
return true
}
return false
}
// SetData gets a reference to the given interface{} and assigns it to the Data field.
func (o *EsignEsignEvent) SetData(v interface{}) {
o.Data = v
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *EsignEsignEvent) GetEmail() string {
if o == nil || IsNil(o.Email) {
var ret string
return ret
}
return *o.Email
}
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EsignEsignEvent) GetEmailOk() (*string, bool) {
if o == nil || IsNil(o.Email) {
return nil, false
}
return o.Email, true
}
// HasEmail returns a boolean if a field has been set.
func (o *EsignEsignEvent) HasEmail() bool {
if o != nil && !IsNil(o.Email) {
return true
}
return false
}
// SetEmail gets a reference to the given string and assigns it to the Email field.
func (o *EsignEsignEvent) SetEmail(v string) {
o.Email = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *EsignEsignEvent) 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 *EsignEsignEvent) 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 *EsignEsignEvent) 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 *EsignEsignEvent) SetId(v string) {
o.Id = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *EsignEsignEvent) 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 *EsignEsignEvent) 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 *EsignEsignEvent) 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 *EsignEsignEvent) SetName(v string) {
o.Name = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *EsignEsignEvent) 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 *EsignEsignEvent) 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 *EsignEsignEvent) 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 *EsignEsignEvent) SetType(v string) {
o.Type = &v
}
func (o EsignEsignEvent) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EsignEsignEvent) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if o.Data != nil {
toSerialize["data"] = o.Data
}
if !IsNil(o.Email) {
toSerialize["email"] = o.Email
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EsignEsignEvent) UnmarshalJSON(data []byte) (err error) {
varEsignEsignEvent := _EsignEsignEvent{}
err = json.Unmarshal(data, &varEsignEsignEvent)
if err != nil {
return err
}
*o = EsignEsignEvent(varEsignEsignEvent)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdAt")
delete(additionalProperties, "data")
delete(additionalProperties, "email")
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "type")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEsignEsignEvent struct {
value *EsignEsignEvent
isSet bool
}
func (v NullableEsignEsignEvent) Get() *EsignEsignEvent {
return v.value
}
func (v *NullableEsignEsignEvent) Set(val *EsignEsignEvent) {
v.value = val
v.isSet = true
}
func (v NullableEsignEsignEvent) IsSet() bool {
return v.isSet
}
func (v *NullableEsignEsignEvent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEsignEsignEvent(val *EsignEsignEvent) *NullableEsignEsignEvent {
return &NullableEsignEsignEvent{value: val, isSet: true}
}
func (v NullableEsignEsignEvent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEsignEsignEvent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}