mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
1067 lines
30 KiB
Go
1067 lines
30 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 AuditWire type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AuditWire{}
|
|
|
|
// AuditWire struct for AuditWire
|
|
type AuditWire struct {
|
|
// Act is present ONLY on an action taken in a support session: the platform operator IAM signed in AS this row's sub, while org, sub and email stay the person's. A console row carrying `act` was done by the operator it names.
|
|
Act *AuditAct `json:"act,omitempty"`
|
|
// Action is the verb that was performed. It is the event's name, not the HTTP method — a request-sourced record carries both, and the pair is what makes a row readable (\"grant.create\" at POST /v1/admin/grants).
|
|
Action *string `json:"action,omitempty"`
|
|
After interface{} `json:"after,omitempty"`
|
|
// Agent is present ONLY on an action a delegated token took: who acted for this row's sub — the deployment that ran their work in a sandbox — while org, sub and email stay the person's, who is billed for it.
|
|
Agent *string `json:"agent,omitempty"`
|
|
// Auth is the credential the actor presented: \"jwt\", \"api-key\", or \"none\".
|
|
AuthMethod *string `json:"authMethod,omitempty"`
|
|
Before interface{} `json:"before,omitempty"`
|
|
// Email is the actor's validated address, absent when the credential carried none. It comes from the verified token, never from a client header.
|
|
Email *string `json:"email,omitempty"`
|
|
// Hash is this record's SHA-256 over its own canonical JSON with both hash fields cleared, folded with prevHash. Recomputing it from the row's other fields is what proves the row has not been edited.
|
|
Hash *string `json:"hash,omitempty"`
|
|
// Home is present ONLY on a cross-org action: the org the actor came FROM, while Org is the org they acted IN. A console row carrying `home` is a platform-admin impersonation and should be rendered as one.
|
|
Home *string `json:"home,omitempty"`
|
|
// IsAdmin is the VALIDATED platform-SuperAdmin bit at decision time (owner == \"admin\", principal.Super), never the client's own claim to be one.
|
|
IsAdmin *bool `json:"isAdmin,omitempty"`
|
|
// Method is the HTTP verb, on a record a request produced. Absent on an event emitted from inside the binary with no request behind it.
|
|
Method *string `json:"method,omitempty"`
|
|
// Org is the tenant the action was taken IN — the effective org, which for everyone but an impersonating SuperAdmin is also the actor's own. Empty on an unauthenticated request.
|
|
Org *string `json:"org,omitempty"`
|
|
// Path is the request's route. Any segment shaped like a credential is replaced before the record is written, so a key that rides in a path is not preserved here by the very control meant to watch it.
|
|
Path *string `json:"path,omitempty"`
|
|
// PrevHash is the hash of record seq-1, which is what links the rows into a chain: a deleted or reordered record breaks the recomputation at that point. The first record of a chain carries 64 zeros rather than an empty string, so \"start of chain\" and \"field missing\" cannot look alike.
|
|
PrevHash *string `json:"prevHash,omitempty"`
|
|
// Reason is a short explanation for a deny or an error (\"SuperAdmin required\", \"insufficient_balance\"). It is never a secret and never a raw upstream error body; absent on a success.
|
|
Reason *string `json:"reason,omitempty"`
|
|
// RequestID ties this row to the request-line log and any downstream trace — the X-Request-Id the pipeline minted for that request.
|
|
RequestId *string `json:"requestId,omitempty"`
|
|
// Resource is the KIND of thing acted upon (\"org\", \"role\", \"secret\", \"provider-config\", \"credit\"). Where a mutation has no finer semantics than its route, this is the route family and resourceId is empty — the action and the path already pin the object.
|
|
Resource *string `json:"resource,omitempty"`
|
|
// ResourceID is the specific instance, absent when the kind alone identifies it.
|
|
ResourceId *string `json:"resourceId,omitempty"`
|
|
// Result is how the action ended: \"success\", \"deny\" or \"error\". A deny is a decision this binary made and is as much evidence as a success.
|
|
Result *string `json:"result,omitempty"`
|
|
// Seq is the record's position in the chain, 0-based and gapless. The Recorder assigns it under its own lock, so it is a true total order: seq n+1 was written after seq n, and a missing number is a missing record.
|
|
Seq *int32 `json:"seq,omitempty"`
|
|
// SourceIP is the client address the edge resolved for the request, after the proxy chain — the address a responder would act on, not the socket peer.
|
|
SourceIp *string `json:"sourceIp,omitempty"`
|
|
// Status is the HTTP status the caller received. It is the outcome as the client saw it, so a 200 carrying a domain refusal still reads 200 here.
|
|
Status *int64 `json:"status,omitempty"`
|
|
// Sub is the acting user (the IAM subject). Empty for a machine principal or an anonymous request, which is how a service action is told from a person's.
|
|
Sub *string `json:"sub,omitempty"`
|
|
// Time is when the action happened, RFC3339Nano in UTC. The stored column has the same precision and sorts the same way, so a client can range and order on this string verbatim.
|
|
Time *string `json:"time,omitempty"`
|
|
// UserAgent is the client the request announced itself as. Client-supplied, so it is evidence about what claimed to act, not proof of it.
|
|
UserAgent *string `json:"userAgent,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AuditWire AuditWire
|
|
|
|
// NewAuditWire instantiates a new AuditWire 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 NewAuditWire() *AuditWire {
|
|
this := AuditWire{}
|
|
return &this
|
|
}
|
|
|
|
// NewAuditWireWithDefaults instantiates a new AuditWire 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 NewAuditWireWithDefaults() *AuditWire {
|
|
this := AuditWire{}
|
|
return &this
|
|
}
|
|
|
|
// GetAct returns the Act field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetAct() AuditAct {
|
|
if o == nil || IsNil(o.Act) {
|
|
var ret AuditAct
|
|
return ret
|
|
}
|
|
return *o.Act
|
|
}
|
|
|
|
// GetActOk returns a tuple with the Act field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetActOk() (*AuditAct, bool) {
|
|
if o == nil || IsNil(o.Act) {
|
|
return nil, false
|
|
}
|
|
return o.Act, true
|
|
}
|
|
|
|
// HasAct returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasAct() bool {
|
|
if o != nil && !IsNil(o.Act) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAct gets a reference to the given AuditAct and assigns it to the Act field.
|
|
func (o *AuditWire) SetAct(v AuditAct) {
|
|
o.Act = &v
|
|
}
|
|
|
|
// GetAction returns the Action field value if set, zero value otherwise.
|
|
func (o *AuditWire) 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 *AuditWire) 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 *AuditWire) 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 *AuditWire) SetAction(v string) {
|
|
o.Action = &v
|
|
}
|
|
|
|
// GetAfter returns the After field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AuditWire) GetAfter() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.After
|
|
}
|
|
|
|
// GetAfterOk returns a tuple with the After 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 *AuditWire) GetAfterOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.After) {
|
|
return nil, false
|
|
}
|
|
return &o.After, true
|
|
}
|
|
|
|
// HasAfter returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasAfter() bool {
|
|
if o != nil && !IsNil(o.After) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAfter gets a reference to the given interface{} and assigns it to the After field.
|
|
func (o *AuditWire) SetAfter(v interface{}) {
|
|
o.After = v
|
|
}
|
|
|
|
// GetAgent returns the Agent field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetAgent() string {
|
|
if o == nil || IsNil(o.Agent) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Agent
|
|
}
|
|
|
|
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetAgentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Agent) {
|
|
return nil, false
|
|
}
|
|
return o.Agent, true
|
|
}
|
|
|
|
// HasAgent returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasAgent() bool {
|
|
if o != nil && !IsNil(o.Agent) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAgent gets a reference to the given string and assigns it to the Agent field.
|
|
func (o *AuditWire) SetAgent(v string) {
|
|
o.Agent = &v
|
|
}
|
|
|
|
// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetAuthMethod() string {
|
|
if o == nil || IsNil(o.AuthMethod) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AuthMethod
|
|
}
|
|
|
|
// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetAuthMethodOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AuthMethod) {
|
|
return nil, false
|
|
}
|
|
return o.AuthMethod, true
|
|
}
|
|
|
|
// HasAuthMethod returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasAuthMethod() bool {
|
|
if o != nil && !IsNil(o.AuthMethod) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAuthMethod gets a reference to the given string and assigns it to the AuthMethod field.
|
|
func (o *AuditWire) SetAuthMethod(v string) {
|
|
o.AuthMethod = &v
|
|
}
|
|
|
|
// GetBefore returns the Before field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AuditWire) GetBefore() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Before
|
|
}
|
|
|
|
// GetBeforeOk returns a tuple with the Before 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 *AuditWire) GetBeforeOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Before) {
|
|
return nil, false
|
|
}
|
|
return &o.Before, true
|
|
}
|
|
|
|
// HasBefore returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasBefore() bool {
|
|
if o != nil && !IsNil(o.Before) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBefore gets a reference to the given interface{} and assigns it to the Before field.
|
|
func (o *AuditWire) SetBefore(v interface{}) {
|
|
o.Before = v
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise.
|
|
func (o *AuditWire) 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 *AuditWire) 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 *AuditWire) 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 *AuditWire) SetEmail(v string) {
|
|
o.Email = &v
|
|
}
|
|
|
|
// GetHash returns the Hash field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetHash() string {
|
|
if o == nil || IsNil(o.Hash) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Hash
|
|
}
|
|
|
|
// GetHashOk returns a tuple with the Hash field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetHashOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Hash) {
|
|
return nil, false
|
|
}
|
|
return o.Hash, true
|
|
}
|
|
|
|
// HasHash returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasHash() bool {
|
|
if o != nil && !IsNil(o.Hash) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHash gets a reference to the given string and assigns it to the Hash field.
|
|
func (o *AuditWire) SetHash(v string) {
|
|
o.Hash = &v
|
|
}
|
|
|
|
// GetHome returns the Home field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetHome() string {
|
|
if o == nil || IsNil(o.Home) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Home
|
|
}
|
|
|
|
// GetHomeOk returns a tuple with the Home field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetHomeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Home) {
|
|
return nil, false
|
|
}
|
|
return o.Home, true
|
|
}
|
|
|
|
// HasHome returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasHome() bool {
|
|
if o != nil && !IsNil(o.Home) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHome gets a reference to the given string and assigns it to the Home field.
|
|
func (o *AuditWire) SetHome(v string) {
|
|
o.Home = &v
|
|
}
|
|
|
|
// GetIsAdmin returns the IsAdmin field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetIsAdmin() bool {
|
|
if o == nil || IsNil(o.IsAdmin) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.IsAdmin
|
|
}
|
|
|
|
// GetIsAdminOk returns a tuple with the IsAdmin field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetIsAdminOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.IsAdmin) {
|
|
return nil, false
|
|
}
|
|
return o.IsAdmin, true
|
|
}
|
|
|
|
// HasIsAdmin returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasIsAdmin() bool {
|
|
if o != nil && !IsNil(o.IsAdmin) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field.
|
|
func (o *AuditWire) SetIsAdmin(v bool) {
|
|
o.IsAdmin = &v
|
|
}
|
|
|
|
// GetMethod returns the Method field value if set, zero value otherwise.
|
|
func (o *AuditWire) 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 *AuditWire) 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 *AuditWire) 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 *AuditWire) SetMethod(v string) {
|
|
o.Method = &v
|
|
}
|
|
|
|
// GetOrg returns the Org field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetOrg() string {
|
|
if o == nil || IsNil(o.Org) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Org
|
|
}
|
|
|
|
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetOrgOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Org) {
|
|
return nil, false
|
|
}
|
|
return o.Org, true
|
|
}
|
|
|
|
// HasOrg returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasOrg() bool {
|
|
if o != nil && !IsNil(o.Org) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrg gets a reference to the given string and assigns it to the Org field.
|
|
func (o *AuditWire) SetOrg(v string) {
|
|
o.Org = &v
|
|
}
|
|
|
|
// GetPath returns the Path field value if set, zero value otherwise.
|
|
func (o *AuditWire) 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 *AuditWire) 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 *AuditWire) 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 *AuditWire) SetPath(v string) {
|
|
o.Path = &v
|
|
}
|
|
|
|
// GetPrevHash returns the PrevHash field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetPrevHash() string {
|
|
if o == nil || IsNil(o.PrevHash) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PrevHash
|
|
}
|
|
|
|
// GetPrevHashOk returns a tuple with the PrevHash field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetPrevHashOk() (*string, bool) {
|
|
if o == nil || IsNil(o.PrevHash) {
|
|
return nil, false
|
|
}
|
|
return o.PrevHash, true
|
|
}
|
|
|
|
// HasPrevHash returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasPrevHash() bool {
|
|
if o != nil && !IsNil(o.PrevHash) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrevHash gets a reference to the given string and assigns it to the PrevHash field.
|
|
func (o *AuditWire) SetPrevHash(v string) {
|
|
o.PrevHash = &v
|
|
}
|
|
|
|
// GetReason returns the Reason field value if set, zero value otherwise.
|
|
func (o *AuditWire) 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 *AuditWire) 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 *AuditWire) 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 *AuditWire) SetReason(v string) {
|
|
o.Reason = &v
|
|
}
|
|
|
|
// GetRequestId returns the RequestId field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetRequestId() string {
|
|
if o == nil || IsNil(o.RequestId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RequestId
|
|
}
|
|
|
|
// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetRequestIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RequestId) {
|
|
return nil, false
|
|
}
|
|
return o.RequestId, true
|
|
}
|
|
|
|
// HasRequestId returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasRequestId() bool {
|
|
if o != nil && !IsNil(o.RequestId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRequestId gets a reference to the given string and assigns it to the RequestId field.
|
|
func (o *AuditWire) SetRequestId(v string) {
|
|
o.RequestId = &v
|
|
}
|
|
|
|
// GetResource returns the Resource field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetResource() string {
|
|
if o == nil || IsNil(o.Resource) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Resource
|
|
}
|
|
|
|
// GetResourceOk returns a tuple with the Resource field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetResourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Resource) {
|
|
return nil, false
|
|
}
|
|
return o.Resource, true
|
|
}
|
|
|
|
// HasResource returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasResource() bool {
|
|
if o != nil && !IsNil(o.Resource) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResource gets a reference to the given string and assigns it to the Resource field.
|
|
func (o *AuditWire) SetResource(v string) {
|
|
o.Resource = &v
|
|
}
|
|
|
|
// GetResourceId returns the ResourceId field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetResourceId() string {
|
|
if o == nil || IsNil(o.ResourceId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ResourceId
|
|
}
|
|
|
|
// GetResourceIdOk returns a tuple with the ResourceId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetResourceIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ResourceId) {
|
|
return nil, false
|
|
}
|
|
return o.ResourceId, true
|
|
}
|
|
|
|
// HasResourceId returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasResourceId() bool {
|
|
if o != nil && !IsNil(o.ResourceId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResourceId gets a reference to the given string and assigns it to the ResourceId field.
|
|
func (o *AuditWire) SetResourceId(v string) {
|
|
o.ResourceId = &v
|
|
}
|
|
|
|
// GetResult returns the Result field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetResult() string {
|
|
if o == nil || IsNil(o.Result) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Result
|
|
}
|
|
|
|
// GetResultOk returns a tuple with the Result field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetResultOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Result) {
|
|
return nil, false
|
|
}
|
|
return o.Result, true
|
|
}
|
|
|
|
// HasResult returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasResult() bool {
|
|
if o != nil && !IsNil(o.Result) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResult gets a reference to the given string and assigns it to the Result field.
|
|
func (o *AuditWire) SetResult(v string) {
|
|
o.Result = &v
|
|
}
|
|
|
|
// GetSeq returns the Seq field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetSeq() int32 {
|
|
if o == nil || IsNil(o.Seq) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Seq
|
|
}
|
|
|
|
// GetSeqOk returns a tuple with the Seq field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetSeqOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Seq) {
|
|
return nil, false
|
|
}
|
|
return o.Seq, true
|
|
}
|
|
|
|
// HasSeq returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasSeq() bool {
|
|
if o != nil && !IsNil(o.Seq) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSeq gets a reference to the given int32 and assigns it to the Seq field.
|
|
func (o *AuditWire) SetSeq(v int32) {
|
|
o.Seq = &v
|
|
}
|
|
|
|
// GetSourceIp returns the SourceIp field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetSourceIp() string {
|
|
if o == nil || IsNil(o.SourceIp) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SourceIp
|
|
}
|
|
|
|
// GetSourceIpOk returns a tuple with the SourceIp field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetSourceIpOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SourceIp) {
|
|
return nil, false
|
|
}
|
|
return o.SourceIp, true
|
|
}
|
|
|
|
// HasSourceIp returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasSourceIp() bool {
|
|
if o != nil && !IsNil(o.SourceIp) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSourceIp gets a reference to the given string and assigns it to the SourceIp field.
|
|
func (o *AuditWire) SetSourceIp(v string) {
|
|
o.SourceIp = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetStatus() int64 {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetStatusOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given int64 and assigns it to the Status field.
|
|
func (o *AuditWire) SetStatus(v int64) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetSub returns the Sub field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetSub() string {
|
|
if o == nil || IsNil(o.Sub) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Sub
|
|
}
|
|
|
|
// GetSubOk returns a tuple with the Sub field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetSubOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Sub) {
|
|
return nil, false
|
|
}
|
|
return o.Sub, true
|
|
}
|
|
|
|
// HasSub returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasSub() bool {
|
|
if o != nil && !IsNil(o.Sub) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSub gets a reference to the given string and assigns it to the Sub field.
|
|
func (o *AuditWire) SetSub(v string) {
|
|
o.Sub = &v
|
|
}
|
|
|
|
// GetTime returns the Time field value if set, zero value otherwise.
|
|
func (o *AuditWire) GetTime() string {
|
|
if o == nil || IsNil(o.Time) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Time
|
|
}
|
|
|
|
// GetTimeOk returns a tuple with the Time field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuditWire) GetTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Time) {
|
|
return nil, false
|
|
}
|
|
return o.Time, true
|
|
}
|
|
|
|
// HasTime returns a boolean if a field has been set.
|
|
func (o *AuditWire) HasTime() bool {
|
|
if o != nil && !IsNil(o.Time) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTime gets a reference to the given string and assigns it to the Time field.
|
|
func (o *AuditWire) SetTime(v string) {
|
|
o.Time = &v
|
|
}
|
|
|
|
// GetUserAgent returns the UserAgent field value if set, zero value otherwise.
|
|
func (o *AuditWire) 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 *AuditWire) 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 *AuditWire) 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 *AuditWire) SetUserAgent(v string) {
|
|
o.UserAgent = &v
|
|
}
|
|
|
|
func (o AuditWire) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AuditWire) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Act) {
|
|
toSerialize["act"] = o.Act
|
|
}
|
|
if !IsNil(o.Action) {
|
|
toSerialize["action"] = o.Action
|
|
}
|
|
if o.After != nil {
|
|
toSerialize["after"] = o.After
|
|
}
|
|
if !IsNil(o.Agent) {
|
|
toSerialize["agent"] = o.Agent
|
|
}
|
|
if !IsNil(o.AuthMethod) {
|
|
toSerialize["authMethod"] = o.AuthMethod
|
|
}
|
|
if o.Before != nil {
|
|
toSerialize["before"] = o.Before
|
|
}
|
|
if !IsNil(o.Email) {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if !IsNil(o.Hash) {
|
|
toSerialize["hash"] = o.Hash
|
|
}
|
|
if !IsNil(o.Home) {
|
|
toSerialize["home"] = o.Home
|
|
}
|
|
if !IsNil(o.IsAdmin) {
|
|
toSerialize["isAdmin"] = o.IsAdmin
|
|
}
|
|
if !IsNil(o.Method) {
|
|
toSerialize["method"] = o.Method
|
|
}
|
|
if !IsNil(o.Org) {
|
|
toSerialize["org"] = o.Org
|
|
}
|
|
if !IsNil(o.Path) {
|
|
toSerialize["path"] = o.Path
|
|
}
|
|
if !IsNil(o.PrevHash) {
|
|
toSerialize["prevHash"] = o.PrevHash
|
|
}
|
|
if !IsNil(o.Reason) {
|
|
toSerialize["reason"] = o.Reason
|
|
}
|
|
if !IsNil(o.RequestId) {
|
|
toSerialize["requestId"] = o.RequestId
|
|
}
|
|
if !IsNil(o.Resource) {
|
|
toSerialize["resource"] = o.Resource
|
|
}
|
|
if !IsNil(o.ResourceId) {
|
|
toSerialize["resourceId"] = o.ResourceId
|
|
}
|
|
if !IsNil(o.Result) {
|
|
toSerialize["result"] = o.Result
|
|
}
|
|
if !IsNil(o.Seq) {
|
|
toSerialize["seq"] = o.Seq
|
|
}
|
|
if !IsNil(o.SourceIp) {
|
|
toSerialize["sourceIp"] = o.SourceIp
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Sub) {
|
|
toSerialize["sub"] = o.Sub
|
|
}
|
|
if !IsNil(o.Time) {
|
|
toSerialize["time"] = o.Time
|
|
}
|
|
if !IsNil(o.UserAgent) {
|
|
toSerialize["userAgent"] = o.UserAgent
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AuditWire) UnmarshalJSON(data []byte) (err error) {
|
|
varAuditWire := _AuditWire{}
|
|
|
|
err = json.Unmarshal(data, &varAuditWire)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AuditWire(varAuditWire)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "act")
|
|
delete(additionalProperties, "action")
|
|
delete(additionalProperties, "after")
|
|
delete(additionalProperties, "agent")
|
|
delete(additionalProperties, "authMethod")
|
|
delete(additionalProperties, "before")
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "hash")
|
|
delete(additionalProperties, "home")
|
|
delete(additionalProperties, "isAdmin")
|
|
delete(additionalProperties, "method")
|
|
delete(additionalProperties, "org")
|
|
delete(additionalProperties, "path")
|
|
delete(additionalProperties, "prevHash")
|
|
delete(additionalProperties, "reason")
|
|
delete(additionalProperties, "requestId")
|
|
delete(additionalProperties, "resource")
|
|
delete(additionalProperties, "resourceId")
|
|
delete(additionalProperties, "result")
|
|
delete(additionalProperties, "seq")
|
|
delete(additionalProperties, "sourceIp")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "sub")
|
|
delete(additionalProperties, "time")
|
|
delete(additionalProperties, "userAgent")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAuditWire struct {
|
|
value *AuditWire
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAuditWire) Get() *AuditWire {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAuditWire) Set(val *AuditWire) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAuditWire) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAuditWire) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAuditWire(val *AuditWire) *NullableAuditWire {
|
|
return &NullableAuditWire{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAuditWire) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAuditWire) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|