Files
sdk/model_audit.go

1264 lines
32 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 Audit type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Audit{}
// Audit struct for Audit
type Audit struct {
Action *string `json:"action,omitempty"`
Block *string `json:"block,omitempty"`
Block2 *string `json:"block2,omitempty"`
BlockHash *string `json:"blockHash,omitempty"`
BlockHash2 *string `json:"blockHash2,omitempty"`
City *string `json:"city,omitempty"`
ClientIp *string `json:"clientIp,omitempty"`
Count *int32 `json:"count,omitempty"`
CreatedTime *string `json:"createdTime,omitempty"`
ErrorText *string `json:"errorText,omitempty"`
Id *int32 `json:"id,omitempty"`
IsTriggered *bool `json:"isTriggered,omitempty"`
Language *string `json:"language,omitempty"`
Method *string `json:"method,omitempty"`
Name *string `json:"name,omitempty"`
NeedCommit *bool `json:"needCommit,omitempty"`
Object *string `json:"object,omitempty"`
Organization *string `json:"organization,omitempty"`
Owner *string `json:"owner,omitempty"`
Provider *string `json:"provider,omitempty"`
Provider2 *string `json:"provider2,omitempty"`
Query *string `json:"query,omitempty"`
Region *string `json:"region,omitempty"`
RequestUri *string `json:"requestUri,omitempty"`
Response *string `json:"response,omitempty"`
Section *string `json:"section,omitempty"`
Transaction *string `json:"transaction,omitempty"`
Transaction2 *string `json:"transaction2,omitempty"`
Unit *string `json:"unit,omitempty"`
User *string `json:"user,omitempty"`
UserAgent *string `json:"userAgent,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Audit Audit
// NewAudit instantiates a new Audit 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 NewAudit() *Audit {
this := Audit{}
return &this
}
// NewAuditWithDefaults instantiates a new Audit 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 NewAuditWithDefaults() *Audit {
this := Audit{}
return &this
}
// GetAction returns the Action field value if set, zero value otherwise.
func (o *Audit) GetAction() string {
if o == nil || IsNil(o.Action) {
var ret string
return ret
}
return *o.Action
}
// GetActionOk returns a tuple with the Action field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetActionOk() (*string, bool) {
if o == nil || IsNil(o.Action) {
return nil, false
}
return o.Action, true
}
// HasAction returns a boolean if a field has been set.
func (o *Audit) HasAction() bool {
if o != nil && !IsNil(o.Action) {
return true
}
return false
}
// SetAction gets a reference to the given string and assigns it to the Action field.
func (o *Audit) SetAction(v string) {
o.Action = &v
}
// GetBlock returns the Block field value if set, zero value otherwise.
func (o *Audit) GetBlock() string {
if o == nil || IsNil(o.Block) {
var ret string
return ret
}
return *o.Block
}
// GetBlockOk returns a tuple with the Block field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetBlockOk() (*string, bool) {
if o == nil || IsNil(o.Block) {
return nil, false
}
return o.Block, true
}
// HasBlock returns a boolean if a field has been set.
func (o *Audit) HasBlock() bool {
if o != nil && !IsNil(o.Block) {
return true
}
return false
}
// SetBlock gets a reference to the given string and assigns it to the Block field.
func (o *Audit) SetBlock(v string) {
o.Block = &v
}
// GetBlock2 returns the Block2 field value if set, zero value otherwise.
func (o *Audit) GetBlock2() string {
if o == nil || IsNil(o.Block2) {
var ret string
return ret
}
return *o.Block2
}
// GetBlock2Ok returns a tuple with the Block2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetBlock2Ok() (*string, bool) {
if o == nil || IsNil(o.Block2) {
return nil, false
}
return o.Block2, true
}
// HasBlock2 returns a boolean if a field has been set.
func (o *Audit) HasBlock2() bool {
if o != nil && !IsNil(o.Block2) {
return true
}
return false
}
// SetBlock2 gets a reference to the given string and assigns it to the Block2 field.
func (o *Audit) SetBlock2(v string) {
o.Block2 = &v
}
// GetBlockHash returns the BlockHash field value if set, zero value otherwise.
func (o *Audit) GetBlockHash() string {
if o == nil || IsNil(o.BlockHash) {
var ret string
return ret
}
return *o.BlockHash
}
// GetBlockHashOk returns a tuple with the BlockHash field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetBlockHashOk() (*string, bool) {
if o == nil || IsNil(o.BlockHash) {
return nil, false
}
return o.BlockHash, true
}
// HasBlockHash returns a boolean if a field has been set.
func (o *Audit) HasBlockHash() bool {
if o != nil && !IsNil(o.BlockHash) {
return true
}
return false
}
// SetBlockHash gets a reference to the given string and assigns it to the BlockHash field.
func (o *Audit) SetBlockHash(v string) {
o.BlockHash = &v
}
// GetBlockHash2 returns the BlockHash2 field value if set, zero value otherwise.
func (o *Audit) GetBlockHash2() string {
if o == nil || IsNil(o.BlockHash2) {
var ret string
return ret
}
return *o.BlockHash2
}
// GetBlockHash2Ok returns a tuple with the BlockHash2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetBlockHash2Ok() (*string, bool) {
if o == nil || IsNil(o.BlockHash2) {
return nil, false
}
return o.BlockHash2, true
}
// HasBlockHash2 returns a boolean if a field has been set.
func (o *Audit) HasBlockHash2() bool {
if o != nil && !IsNil(o.BlockHash2) {
return true
}
return false
}
// SetBlockHash2 gets a reference to the given string and assigns it to the BlockHash2 field.
func (o *Audit) SetBlockHash2(v string) {
o.BlockHash2 = &v
}
// GetCity returns the City field value if set, zero value otherwise.
func (o *Audit) GetCity() string {
if o == nil || IsNil(o.City) {
var ret string
return ret
}
return *o.City
}
// GetCityOk returns a tuple with the City field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetCityOk() (*string, bool) {
if o == nil || IsNil(o.City) {
return nil, false
}
return o.City, true
}
// HasCity returns a boolean if a field has been set.
func (o *Audit) HasCity() bool {
if o != nil && !IsNil(o.City) {
return true
}
return false
}
// SetCity gets a reference to the given string and assigns it to the City field.
func (o *Audit) SetCity(v string) {
o.City = &v
}
// GetClientIp returns the ClientIp field value if set, zero value otherwise.
func (o *Audit) GetClientIp() string {
if o == nil || IsNil(o.ClientIp) {
var ret string
return ret
}
return *o.ClientIp
}
// GetClientIpOk returns a tuple with the ClientIp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetClientIpOk() (*string, bool) {
if o == nil || IsNil(o.ClientIp) {
return nil, false
}
return o.ClientIp, true
}
// HasClientIp returns a boolean if a field has been set.
func (o *Audit) HasClientIp() bool {
if o != nil && !IsNil(o.ClientIp) {
return true
}
return false
}
// SetClientIp gets a reference to the given string and assigns it to the ClientIp field.
func (o *Audit) SetClientIp(v string) {
o.ClientIp = &v
}
// GetCount returns the Count field value if set, zero value otherwise.
func (o *Audit) 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 *Audit) 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 *Audit) 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 *Audit) SetCount(v int32) {
o.Count = &v
}
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
func (o *Audit) GetCreatedTime() string {
if o == nil || IsNil(o.CreatedTime) {
var ret string
return ret
}
return *o.CreatedTime
}
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetCreatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.CreatedTime) {
return nil, false
}
return o.CreatedTime, true
}
// HasCreatedTime returns a boolean if a field has been set.
func (o *Audit) HasCreatedTime() bool {
if o != nil && !IsNil(o.CreatedTime) {
return true
}
return false
}
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
func (o *Audit) SetCreatedTime(v string) {
o.CreatedTime = &v
}
// GetErrorText returns the ErrorText field value if set, zero value otherwise.
func (o *Audit) GetErrorText() string {
if o == nil || IsNil(o.ErrorText) {
var ret string
return ret
}
return *o.ErrorText
}
// GetErrorTextOk returns a tuple with the ErrorText field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetErrorTextOk() (*string, bool) {
if o == nil || IsNil(o.ErrorText) {
return nil, false
}
return o.ErrorText, true
}
// HasErrorText returns a boolean if a field has been set.
func (o *Audit) HasErrorText() bool {
if o != nil && !IsNil(o.ErrorText) {
return true
}
return false
}
// SetErrorText gets a reference to the given string and assigns it to the ErrorText field.
func (o *Audit) SetErrorText(v string) {
o.ErrorText = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Audit) GetId() int32 {
if o == nil || IsNil(o.Id) {
var ret int32
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 *Audit) GetIdOk() (*int32, 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 *Audit) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given int32 and assigns it to the Id field.
func (o *Audit) SetId(v int32) {
o.Id = &v
}
// GetIsTriggered returns the IsTriggered field value if set, zero value otherwise.
func (o *Audit) GetIsTriggered() bool {
if o == nil || IsNil(o.IsTriggered) {
var ret bool
return ret
}
return *o.IsTriggered
}
// GetIsTriggeredOk returns a tuple with the IsTriggered field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetIsTriggeredOk() (*bool, bool) {
if o == nil || IsNil(o.IsTriggered) {
return nil, false
}
return o.IsTriggered, true
}
// HasIsTriggered returns a boolean if a field has been set.
func (o *Audit) HasIsTriggered() bool {
if o != nil && !IsNil(o.IsTriggered) {
return true
}
return false
}
// SetIsTriggered gets a reference to the given bool and assigns it to the IsTriggered field.
func (o *Audit) SetIsTriggered(v bool) {
o.IsTriggered = &v
}
// GetLanguage returns the Language field value if set, zero value otherwise.
func (o *Audit) GetLanguage() string {
if o == nil || IsNil(o.Language) {
var ret string
return ret
}
return *o.Language
}
// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetLanguageOk() (*string, bool) {
if o == nil || IsNil(o.Language) {
return nil, false
}
return o.Language, true
}
// HasLanguage returns a boolean if a field has been set.
func (o *Audit) HasLanguage() bool {
if o != nil && !IsNil(o.Language) {
return true
}
return false
}
// SetLanguage gets a reference to the given string and assigns it to the Language field.
func (o *Audit) SetLanguage(v string) {
o.Language = &v
}
// GetMethod returns the Method field value if set, zero value otherwise.
func (o *Audit) GetMethod() string {
if o == nil || IsNil(o.Method) {
var ret string
return ret
}
return *o.Method
}
// GetMethodOk returns a tuple with the Method field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetMethodOk() (*string, bool) {
if o == nil || IsNil(o.Method) {
return nil, false
}
return o.Method, true
}
// HasMethod returns a boolean if a field has been set.
func (o *Audit) HasMethod() bool {
if o != nil && !IsNil(o.Method) {
return true
}
return false
}
// SetMethod gets a reference to the given string and assigns it to the Method field.
func (o *Audit) SetMethod(v string) {
o.Method = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Audit) 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 *Audit) 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 *Audit) 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 *Audit) SetName(v string) {
o.Name = &v
}
// GetNeedCommit returns the NeedCommit field value if set, zero value otherwise.
func (o *Audit) GetNeedCommit() bool {
if o == nil || IsNil(o.NeedCommit) {
var ret bool
return ret
}
return *o.NeedCommit
}
// GetNeedCommitOk returns a tuple with the NeedCommit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetNeedCommitOk() (*bool, bool) {
if o == nil || IsNil(o.NeedCommit) {
return nil, false
}
return o.NeedCommit, true
}
// HasNeedCommit returns a boolean if a field has been set.
func (o *Audit) HasNeedCommit() bool {
if o != nil && !IsNil(o.NeedCommit) {
return true
}
return false
}
// SetNeedCommit gets a reference to the given bool and assigns it to the NeedCommit field.
func (o *Audit) SetNeedCommit(v bool) {
o.NeedCommit = &v
}
// GetObject returns the Object field value if set, zero value otherwise.
func (o *Audit) GetObject() string {
if o == nil || IsNil(o.Object) {
var ret string
return ret
}
return *o.Object
}
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetObjectOk() (*string, bool) {
if o == nil || IsNil(o.Object) {
return nil, false
}
return o.Object, true
}
// HasObject returns a boolean if a field has been set.
func (o *Audit) HasObject() bool {
if o != nil && !IsNil(o.Object) {
return true
}
return false
}
// SetObject gets a reference to the given string and assigns it to the Object field.
func (o *Audit) SetObject(v string) {
o.Object = &v
}
// GetOrganization returns the Organization field value if set, zero value otherwise.
func (o *Audit) GetOrganization() string {
if o == nil || IsNil(o.Organization) {
var ret string
return ret
}
return *o.Organization
}
// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetOrganizationOk() (*string, bool) {
if o == nil || IsNil(o.Organization) {
return nil, false
}
return o.Organization, true
}
// HasOrganization returns a boolean if a field has been set.
func (o *Audit) HasOrganization() bool {
if o != nil && !IsNil(o.Organization) {
return true
}
return false
}
// SetOrganization gets a reference to the given string and assigns it to the Organization field.
func (o *Audit) SetOrganization(v string) {
o.Organization = &v
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *Audit) GetOwner() string {
if o == nil || IsNil(o.Owner) {
var ret string
return ret
}
return *o.Owner
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetOwnerOk() (*string, bool) {
if o == nil || IsNil(o.Owner) {
return nil, false
}
return o.Owner, true
}
// HasOwner returns a boolean if a field has been set.
func (o *Audit) HasOwner() bool {
if o != nil && !IsNil(o.Owner) {
return true
}
return false
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *Audit) SetOwner(v string) {
o.Owner = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *Audit) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *Audit) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *Audit) SetProvider(v string) {
o.Provider = &v
}
// GetProvider2 returns the Provider2 field value if set, zero value otherwise.
func (o *Audit) GetProvider2() string {
if o == nil || IsNil(o.Provider2) {
var ret string
return ret
}
return *o.Provider2
}
// GetProvider2Ok returns a tuple with the Provider2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetProvider2Ok() (*string, bool) {
if o == nil || IsNil(o.Provider2) {
return nil, false
}
return o.Provider2, true
}
// HasProvider2 returns a boolean if a field has been set.
func (o *Audit) HasProvider2() bool {
if o != nil && !IsNil(o.Provider2) {
return true
}
return false
}
// SetProvider2 gets a reference to the given string and assigns it to the Provider2 field.
func (o *Audit) SetProvider2(v string) {
o.Provider2 = &v
}
// GetQuery returns the Query field value if set, zero value otherwise.
func (o *Audit) GetQuery() string {
if o == nil || IsNil(o.Query) {
var ret string
return ret
}
return *o.Query
}
// GetQueryOk returns a tuple with the Query field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetQueryOk() (*string, bool) {
if o == nil || IsNil(o.Query) {
return nil, false
}
return o.Query, true
}
// HasQuery returns a boolean if a field has been set.
func (o *Audit) HasQuery() bool {
if o != nil && !IsNil(o.Query) {
return true
}
return false
}
// SetQuery gets a reference to the given string and assigns it to the Query field.
func (o *Audit) SetQuery(v string) {
o.Query = &v
}
// GetRegion returns the Region field value if set, zero value otherwise.
func (o *Audit) GetRegion() string {
if o == nil || IsNil(o.Region) {
var ret string
return ret
}
return *o.Region
}
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetRegionOk() (*string, bool) {
if o == nil || IsNil(o.Region) {
return nil, false
}
return o.Region, true
}
// HasRegion returns a boolean if a field has been set.
func (o *Audit) HasRegion() bool {
if o != nil && !IsNil(o.Region) {
return true
}
return false
}
// SetRegion gets a reference to the given string and assigns it to the Region field.
func (o *Audit) SetRegion(v string) {
o.Region = &v
}
// GetRequestUri returns the RequestUri field value if set, zero value otherwise.
func (o *Audit) GetRequestUri() string {
if o == nil || IsNil(o.RequestUri) {
var ret string
return ret
}
return *o.RequestUri
}
// GetRequestUriOk returns a tuple with the RequestUri field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetRequestUriOk() (*string, bool) {
if o == nil || IsNil(o.RequestUri) {
return nil, false
}
return o.RequestUri, true
}
// HasRequestUri returns a boolean if a field has been set.
func (o *Audit) HasRequestUri() bool {
if o != nil && !IsNil(o.RequestUri) {
return true
}
return false
}
// SetRequestUri gets a reference to the given string and assigns it to the RequestUri field.
func (o *Audit) SetRequestUri(v string) {
o.RequestUri = &v
}
// GetResponse returns the Response field value if set, zero value otherwise.
func (o *Audit) GetResponse() string {
if o == nil || IsNil(o.Response) {
var ret string
return ret
}
return *o.Response
}
// GetResponseOk returns a tuple with the Response field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetResponseOk() (*string, bool) {
if o == nil || IsNil(o.Response) {
return nil, false
}
return o.Response, true
}
// HasResponse returns a boolean if a field has been set.
func (o *Audit) HasResponse() bool {
if o != nil && !IsNil(o.Response) {
return true
}
return false
}
// SetResponse gets a reference to the given string and assigns it to the Response field.
func (o *Audit) SetResponse(v string) {
o.Response = &v
}
// GetSection returns the Section field value if set, zero value otherwise.
func (o *Audit) GetSection() string {
if o == nil || IsNil(o.Section) {
var ret string
return ret
}
return *o.Section
}
// GetSectionOk returns a tuple with the Section field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetSectionOk() (*string, bool) {
if o == nil || IsNil(o.Section) {
return nil, false
}
return o.Section, true
}
// HasSection returns a boolean if a field has been set.
func (o *Audit) HasSection() bool {
if o != nil && !IsNil(o.Section) {
return true
}
return false
}
// SetSection gets a reference to the given string and assigns it to the Section field.
func (o *Audit) SetSection(v string) {
o.Section = &v
}
// GetTransaction returns the Transaction field value if set, zero value otherwise.
func (o *Audit) GetTransaction() string {
if o == nil || IsNil(o.Transaction) {
var ret string
return ret
}
return *o.Transaction
}
// GetTransactionOk returns a tuple with the Transaction field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetTransactionOk() (*string, bool) {
if o == nil || IsNil(o.Transaction) {
return nil, false
}
return o.Transaction, true
}
// HasTransaction returns a boolean if a field has been set.
func (o *Audit) HasTransaction() bool {
if o != nil && !IsNil(o.Transaction) {
return true
}
return false
}
// SetTransaction gets a reference to the given string and assigns it to the Transaction field.
func (o *Audit) SetTransaction(v string) {
o.Transaction = &v
}
// GetTransaction2 returns the Transaction2 field value if set, zero value otherwise.
func (o *Audit) GetTransaction2() string {
if o == nil || IsNil(o.Transaction2) {
var ret string
return ret
}
return *o.Transaction2
}
// GetTransaction2Ok returns a tuple with the Transaction2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetTransaction2Ok() (*string, bool) {
if o == nil || IsNil(o.Transaction2) {
return nil, false
}
return o.Transaction2, true
}
// HasTransaction2 returns a boolean if a field has been set.
func (o *Audit) HasTransaction2() bool {
if o != nil && !IsNil(o.Transaction2) {
return true
}
return false
}
// SetTransaction2 gets a reference to the given string and assigns it to the Transaction2 field.
func (o *Audit) SetTransaction2(v string) {
o.Transaction2 = &v
}
// GetUnit returns the Unit field value if set, zero value otherwise.
func (o *Audit) GetUnit() string {
if o == nil || IsNil(o.Unit) {
var ret string
return ret
}
return *o.Unit
}
// GetUnitOk returns a tuple with the Unit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetUnitOk() (*string, bool) {
if o == nil || IsNil(o.Unit) {
return nil, false
}
return o.Unit, true
}
// HasUnit returns a boolean if a field has been set.
func (o *Audit) HasUnit() bool {
if o != nil && !IsNil(o.Unit) {
return true
}
return false
}
// SetUnit gets a reference to the given string and assigns it to the Unit field.
func (o *Audit) SetUnit(v string) {
o.Unit = &v
}
// GetUser returns the User field value if set, zero value otherwise.
func (o *Audit) GetUser() string {
if o == nil || IsNil(o.User) {
var ret string
return ret
}
return *o.User
}
// GetUserOk returns a tuple with the User field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetUserOk() (*string, bool) {
if o == nil || IsNil(o.User) {
return nil, false
}
return o.User, true
}
// HasUser returns a boolean if a field has been set.
func (o *Audit) HasUser() bool {
if o != nil && !IsNil(o.User) {
return true
}
return false
}
// SetUser gets a reference to the given string and assigns it to the User field.
func (o *Audit) SetUser(v string) {
o.User = &v
}
// GetUserAgent returns the UserAgent field value if set, zero value otherwise.
func (o *Audit) GetUserAgent() string {
if o == nil || IsNil(o.UserAgent) {
var ret string
return ret
}
return *o.UserAgent
}
// GetUserAgentOk returns a tuple with the UserAgent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Audit) GetUserAgentOk() (*string, bool) {
if o == nil || IsNil(o.UserAgent) {
return nil, false
}
return o.UserAgent, true
}
// HasUserAgent returns a boolean if a field has been set.
func (o *Audit) HasUserAgent() bool {
if o != nil && !IsNil(o.UserAgent) {
return true
}
return false
}
// SetUserAgent gets a reference to the given string and assigns it to the UserAgent field.
func (o *Audit) SetUserAgent(v string) {
o.UserAgent = &v
}
func (o Audit) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Audit) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Action) {
toSerialize["action"] = o.Action
}
if !IsNil(o.Block) {
toSerialize["block"] = o.Block
}
if !IsNil(o.Block2) {
toSerialize["block2"] = o.Block2
}
if !IsNil(o.BlockHash) {
toSerialize["blockHash"] = o.BlockHash
}
if !IsNil(o.BlockHash2) {
toSerialize["blockHash2"] = o.BlockHash2
}
if !IsNil(o.City) {
toSerialize["city"] = o.City
}
if !IsNil(o.ClientIp) {
toSerialize["clientIp"] = o.ClientIp
}
if !IsNil(o.Count) {
toSerialize["count"] = o.Count
}
if !IsNil(o.CreatedTime) {
toSerialize["createdTime"] = o.CreatedTime
}
if !IsNil(o.ErrorText) {
toSerialize["errorText"] = o.ErrorText
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.IsTriggered) {
toSerialize["isTriggered"] = o.IsTriggered
}
if !IsNil(o.Language) {
toSerialize["language"] = o.Language
}
if !IsNil(o.Method) {
toSerialize["method"] = o.Method
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.NeedCommit) {
toSerialize["needCommit"] = o.NeedCommit
}
if !IsNil(o.Object) {
toSerialize["object"] = o.Object
}
if !IsNil(o.Organization) {
toSerialize["organization"] = o.Organization
}
if !IsNil(o.Owner) {
toSerialize["owner"] = o.Owner
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
if !IsNil(o.Provider2) {
toSerialize["provider2"] = o.Provider2
}
if !IsNil(o.Query) {
toSerialize["query"] = o.Query
}
if !IsNil(o.Region) {
toSerialize["region"] = o.Region
}
if !IsNil(o.RequestUri) {
toSerialize["requestUri"] = o.RequestUri
}
if !IsNil(o.Response) {
toSerialize["response"] = o.Response
}
if !IsNil(o.Section) {
toSerialize["section"] = o.Section
}
if !IsNil(o.Transaction) {
toSerialize["transaction"] = o.Transaction
}
if !IsNil(o.Transaction2) {
toSerialize["transaction2"] = o.Transaction2
}
if !IsNil(o.Unit) {
toSerialize["unit"] = o.Unit
}
if !IsNil(o.User) {
toSerialize["user"] = o.User
}
if !IsNil(o.UserAgent) {
toSerialize["userAgent"] = o.UserAgent
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *Audit) UnmarshalJSON(data []byte) (err error) {
varAudit := _Audit{}
err = json.Unmarshal(data, &varAudit)
if err != nil {
return err
}
*o = Audit(varAudit)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "action")
delete(additionalProperties, "block")
delete(additionalProperties, "block2")
delete(additionalProperties, "blockHash")
delete(additionalProperties, "blockHash2")
delete(additionalProperties, "city")
delete(additionalProperties, "clientIp")
delete(additionalProperties, "count")
delete(additionalProperties, "createdTime")
delete(additionalProperties, "errorText")
delete(additionalProperties, "id")
delete(additionalProperties, "isTriggered")
delete(additionalProperties, "language")
delete(additionalProperties, "method")
delete(additionalProperties, "name")
delete(additionalProperties, "needCommit")
delete(additionalProperties, "object")
delete(additionalProperties, "organization")
delete(additionalProperties, "owner")
delete(additionalProperties, "provider")
delete(additionalProperties, "provider2")
delete(additionalProperties, "query")
delete(additionalProperties, "region")
delete(additionalProperties, "requestUri")
delete(additionalProperties, "response")
delete(additionalProperties, "section")
delete(additionalProperties, "transaction")
delete(additionalProperties, "transaction2")
delete(additionalProperties, "unit")
delete(additionalProperties, "user")
delete(additionalProperties, "userAgent")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAudit struct {
value *Audit
isSet bool
}
func (v NullableAudit) Get() *Audit {
return v.value
}
func (v *NullableAudit) Set(val *Audit) {
v.value = val
v.isSet = true
}
func (v NullableAudit) IsSet() bool {
return v.isSet
}
func (v *NullableAudit) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAudit(val *Audit) *NullableAudit {
return &NullableAudit{value: val, isSet: true}
}
func (v NullableAudit) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAudit) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}