Files
sdk/model_compliance_wire.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 ComplianceWire type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ComplianceWire{}
// ComplianceWire struct for ComplianceWire
type ComplianceWire 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 *ComplianceAct `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 _ComplianceWire ComplianceWire
// NewComplianceWire instantiates a new ComplianceWire 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 NewComplianceWire() *ComplianceWire {
this := ComplianceWire{}
return &this
}
// NewComplianceWireWithDefaults instantiates a new ComplianceWire 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 NewComplianceWireWithDefaults() *ComplianceWire {
this := ComplianceWire{}
return &this
}
// GetAct returns the Act field value if set, zero value otherwise.
func (o *ComplianceWire) GetAct() ComplianceAct {
if o == nil || IsNil(o.Act) {
var ret ComplianceAct
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 *ComplianceWire) GetActOk() (*ComplianceAct, 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 *ComplianceWire) HasAct() bool {
if o != nil && !IsNil(o.Act) {
return true
}
return false
}
// SetAct gets a reference to the given ComplianceAct and assigns it to the Act field.
func (o *ComplianceWire) SetAct(v ComplianceAct) {
o.Act = &v
}
// GetAction returns the Action field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetAfter(v interface{}) {
o.After = v
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetAgent(v string) {
o.Agent = &v
}
// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetBefore(v interface{}) {
o.Before = v
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetEmail(v string) {
o.Email = &v
}
// GetHash returns the Hash field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetHash(v string) {
o.Hash = &v
}
// GetHome returns the Home field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetHome(v string) {
o.Home = &v
}
// GetIsAdmin returns the IsAdmin field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetIsAdmin(v bool) {
o.IsAdmin = &v
}
// GetMethod returns the Method field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetMethod(v string) {
o.Method = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetOrg(v string) {
o.Org = &v
}
// GetPath returns the Path field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetPath(v string) {
o.Path = &v
}
// GetPrevHash returns the PrevHash field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetPrevHash(v string) {
o.PrevHash = &v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetReason(v string) {
o.Reason = &v
}
// GetRequestId returns the RequestId field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetRequestId(v string) {
o.RequestId = &v
}
// GetResource returns the Resource field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetResource(v string) {
o.Resource = &v
}
// GetResourceId returns the ResourceId field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetResourceId(v string) {
o.ResourceId = &v
}
// GetResult returns the Result field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetResult(v string) {
o.Result = &v
}
// GetSeq returns the Seq field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetSeq(v int32) {
o.Seq = &v
}
// GetSourceIp returns the SourceIp field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetSourceIp(v string) {
o.SourceIp = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetStatus(v int64) {
o.Status = &v
}
// GetSub returns the Sub field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetSub(v string) {
o.Sub = &v
}
// GetTime returns the Time field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetTime(v string) {
o.Time = &v
}
// GetUserAgent returns the UserAgent field value if set, zero value otherwise.
func (o *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) 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 *ComplianceWire) SetUserAgent(v string) {
o.UserAgent = &v
}
func (o ComplianceWire) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ComplianceWire) 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 *ComplianceWire) UnmarshalJSON(data []byte) (err error) {
varComplianceWire := _ComplianceWire{}
err = json.Unmarshal(data, &varComplianceWire)
if err != nil {
return err
}
*o = ComplianceWire(varComplianceWire)
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 NullableComplianceWire struct {
value *ComplianceWire
isSet bool
}
func (v NullableComplianceWire) Get() *ComplianceWire {
return v.value
}
func (v *NullableComplianceWire) Set(val *ComplianceWire) {
v.value = val
v.isSet = true
}
func (v NullableComplianceWire) IsSet() bool {
return v.isSet
}
func (v *NullableComplianceWire) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableComplianceWire(val *ComplianceWire) *NullableComplianceWire {
return &NullableComplianceWire{value: val, isSet: true}
}
func (v NullableComplianceWire) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableComplianceWire) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}