Files
sdk/model_principal_match.go

611 lines
16 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the PrincipalMatch type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PrincipalMatch{}
// PrincipalMatch struct for PrincipalMatch
type PrincipalMatch struct {
// DecidedAt is when, unix seconds.
DecidedAt *int64 `json:"decidedAt,omitempty"`
// DecidedBy is the reviewer, or \"exact designated address\".
DecidedBy *string `json:"decidedBy,omitempty"`
// Entry is the designated subject's primary name, or the jurisdiction's.
Entry *string `json:"entry,omitempty"`
// FoundAt is when a screening first found it, unix seconds.
FoundAt *int64 `json:"foundAt,omitempty"`
// Hits are the org's names, addresses and countries that matched, in the order they were first seen. A decision covers the hits it was made on.
Hits []PrincipalHit `json:"hits,omitempty"`
// ID addresses the match for a reviewer's decision. It is the org and the designation together, so a decision is about the org whatever it is called.
Id *string `json:"id,omitempty"`
// List is the publisher — ofac, un, eu or ofsi — or jurisdiction for an embargoed place.
List *string `json:"list,omitempty"`
// Note is the reviewer's reason.
Note *string `json:"note,omitempty"`
// Org is the org the match names.
Org *string `json:"org,omitempty"`
// Reason is what first matched, and which identifiers agreed or conflicted.
Reason *string `json:"reason,omitempty"`
// Ref is the entry's reference on that list, or the country code.
Ref *string `json:"ref,omitempty"`
// Score is the highest similarity seen, 0 to 1; an address or a jurisdiction is 1.
Score *float64 `json:"score,omitempty"`
// Status is open (a reviewer decides), cleared (a namesake, decided) or confirmed (the designated person, decided — or a designated address).
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PrincipalMatch PrincipalMatch
// NewPrincipalMatch instantiates a new PrincipalMatch 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 NewPrincipalMatch() *PrincipalMatch {
this := PrincipalMatch{}
return &this
}
// NewPrincipalMatchWithDefaults instantiates a new PrincipalMatch 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 NewPrincipalMatchWithDefaults() *PrincipalMatch {
this := PrincipalMatch{}
return &this
}
// GetDecidedAt returns the DecidedAt field value if set, zero value otherwise.
func (o *PrincipalMatch) GetDecidedAt() int64 {
if o == nil || IsNil(o.DecidedAt) {
var ret int64
return ret
}
return *o.DecidedAt
}
// GetDecidedAtOk returns a tuple with the DecidedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetDecidedAtOk() (*int64, bool) {
if o == nil || IsNil(o.DecidedAt) {
return nil, false
}
return o.DecidedAt, true
}
// HasDecidedAt returns a boolean if a field has been set.
func (o *PrincipalMatch) HasDecidedAt() bool {
if o != nil && !IsNil(o.DecidedAt) {
return true
}
return false
}
// SetDecidedAt gets a reference to the given int64 and assigns it to the DecidedAt field.
func (o *PrincipalMatch) SetDecidedAt(v int64) {
o.DecidedAt = &v
}
// GetDecidedBy returns the DecidedBy field value if set, zero value otherwise.
func (o *PrincipalMatch) GetDecidedBy() string {
if o == nil || IsNil(o.DecidedBy) {
var ret string
return ret
}
return *o.DecidedBy
}
// GetDecidedByOk returns a tuple with the DecidedBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetDecidedByOk() (*string, bool) {
if o == nil || IsNil(o.DecidedBy) {
return nil, false
}
return o.DecidedBy, true
}
// HasDecidedBy returns a boolean if a field has been set.
func (o *PrincipalMatch) HasDecidedBy() bool {
if o != nil && !IsNil(o.DecidedBy) {
return true
}
return false
}
// SetDecidedBy gets a reference to the given string and assigns it to the DecidedBy field.
func (o *PrincipalMatch) SetDecidedBy(v string) {
o.DecidedBy = &v
}
// GetEntry returns the Entry field value if set, zero value otherwise.
func (o *PrincipalMatch) GetEntry() string {
if o == nil || IsNil(o.Entry) {
var ret string
return ret
}
return *o.Entry
}
// GetEntryOk returns a tuple with the Entry field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetEntryOk() (*string, bool) {
if o == nil || IsNil(o.Entry) {
return nil, false
}
return o.Entry, true
}
// HasEntry returns a boolean if a field has been set.
func (o *PrincipalMatch) HasEntry() bool {
if o != nil && !IsNil(o.Entry) {
return true
}
return false
}
// SetEntry gets a reference to the given string and assigns it to the Entry field.
func (o *PrincipalMatch) SetEntry(v string) {
o.Entry = &v
}
// GetFoundAt returns the FoundAt field value if set, zero value otherwise.
func (o *PrincipalMatch) GetFoundAt() int64 {
if o == nil || IsNil(o.FoundAt) {
var ret int64
return ret
}
return *o.FoundAt
}
// GetFoundAtOk returns a tuple with the FoundAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetFoundAtOk() (*int64, bool) {
if o == nil || IsNil(o.FoundAt) {
return nil, false
}
return o.FoundAt, true
}
// HasFoundAt returns a boolean if a field has been set.
func (o *PrincipalMatch) HasFoundAt() bool {
if o != nil && !IsNil(o.FoundAt) {
return true
}
return false
}
// SetFoundAt gets a reference to the given int64 and assigns it to the FoundAt field.
func (o *PrincipalMatch) SetFoundAt(v int64) {
o.FoundAt = &v
}
// GetHits returns the Hits field value if set, zero value otherwise.
func (o *PrincipalMatch) GetHits() []PrincipalHit {
if o == nil || IsNil(o.Hits) {
var ret []PrincipalHit
return ret
}
return o.Hits
}
// GetHitsOk returns a tuple with the Hits field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetHitsOk() ([]PrincipalHit, bool) {
if o == nil || IsNil(o.Hits) {
return nil, false
}
return o.Hits, true
}
// HasHits returns a boolean if a field has been set.
func (o *PrincipalMatch) HasHits() bool {
if o != nil && !IsNil(o.Hits) {
return true
}
return false
}
// SetHits gets a reference to the given []PrincipalHit and assigns it to the Hits field.
func (o *PrincipalMatch) SetHits(v []PrincipalHit) {
o.Hits = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *PrincipalMatch) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *PrincipalMatch) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *PrincipalMatch) SetId(v string) {
o.Id = &v
}
// GetList returns the List field value if set, zero value otherwise.
func (o *PrincipalMatch) GetList() string {
if o == nil || IsNil(o.List) {
var ret string
return ret
}
return *o.List
}
// GetListOk returns a tuple with the List field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetListOk() (*string, bool) {
if o == nil || IsNil(o.List) {
return nil, false
}
return o.List, true
}
// HasList returns a boolean if a field has been set.
func (o *PrincipalMatch) HasList() bool {
if o != nil && !IsNil(o.List) {
return true
}
return false
}
// SetList gets a reference to the given string and assigns it to the List field.
func (o *PrincipalMatch) SetList(v string) {
o.List = &v
}
// GetNote returns the Note field value if set, zero value otherwise.
func (o *PrincipalMatch) GetNote() string {
if o == nil || IsNil(o.Note) {
var ret string
return ret
}
return *o.Note
}
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetNoteOk() (*string, bool) {
if o == nil || IsNil(o.Note) {
return nil, false
}
return o.Note, true
}
// HasNote returns a boolean if a field has been set.
func (o *PrincipalMatch) HasNote() bool {
if o != nil && !IsNil(o.Note) {
return true
}
return false
}
// SetNote gets a reference to the given string and assigns it to the Note field.
func (o *PrincipalMatch) SetNote(v string) {
o.Note = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *PrincipalMatch) 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 *PrincipalMatch) 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 *PrincipalMatch) 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 *PrincipalMatch) SetOrg(v string) {
o.Org = &v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *PrincipalMatch) 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 *PrincipalMatch) 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 *PrincipalMatch) 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 *PrincipalMatch) SetReason(v string) {
o.Reason = &v
}
// GetRef returns the Ref field value if set, zero value otherwise.
func (o *PrincipalMatch) GetRef() string {
if o == nil || IsNil(o.Ref) {
var ret string
return ret
}
return *o.Ref
}
// GetRefOk returns a tuple with the Ref field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetRefOk() (*string, bool) {
if o == nil || IsNil(o.Ref) {
return nil, false
}
return o.Ref, true
}
// HasRef returns a boolean if a field has been set.
func (o *PrincipalMatch) HasRef() bool {
if o != nil && !IsNil(o.Ref) {
return true
}
return false
}
// SetRef gets a reference to the given string and assigns it to the Ref field.
func (o *PrincipalMatch) SetRef(v string) {
o.Ref = &v
}
// GetScore returns the Score field value if set, zero value otherwise.
func (o *PrincipalMatch) GetScore() float64 {
if o == nil || IsNil(o.Score) {
var ret float64
return ret
}
return *o.Score
}
// GetScoreOk returns a tuple with the Score field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalMatch) GetScoreOk() (*float64, bool) {
if o == nil || IsNil(o.Score) {
return nil, false
}
return o.Score, true
}
// HasScore returns a boolean if a field has been set.
func (o *PrincipalMatch) HasScore() bool {
if o != nil && !IsNil(o.Score) {
return true
}
return false
}
// SetScore gets a reference to the given float64 and assigns it to the Score field.
func (o *PrincipalMatch) SetScore(v float64) {
o.Score = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *PrincipalMatch) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
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 *PrincipalMatch) GetStatusOk() (*string, 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 *PrincipalMatch) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *PrincipalMatch) SetStatus(v string) {
o.Status = &v
}
func (o PrincipalMatch) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PrincipalMatch) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DecidedAt) {
toSerialize["decidedAt"] = o.DecidedAt
}
if !IsNil(o.DecidedBy) {
toSerialize["decidedBy"] = o.DecidedBy
}
if !IsNil(o.Entry) {
toSerialize["entry"] = o.Entry
}
if !IsNil(o.FoundAt) {
toSerialize["foundAt"] = o.FoundAt
}
if !IsNil(o.Hits) {
toSerialize["hits"] = o.Hits
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.List) {
toSerialize["list"] = o.List
}
if !IsNil(o.Note) {
toSerialize["note"] = o.Note
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.Ref) {
toSerialize["ref"] = o.Ref
}
if !IsNil(o.Score) {
toSerialize["score"] = o.Score
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PrincipalMatch) UnmarshalJSON(data []byte) (err error) {
varPrincipalMatch := _PrincipalMatch{}
err = json.Unmarshal(data, &varPrincipalMatch)
if err != nil {
return err
}
*o = PrincipalMatch(varPrincipalMatch)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "decidedAt")
delete(additionalProperties, "decidedBy")
delete(additionalProperties, "entry")
delete(additionalProperties, "foundAt")
delete(additionalProperties, "hits")
delete(additionalProperties, "id")
delete(additionalProperties, "list")
delete(additionalProperties, "note")
delete(additionalProperties, "org")
delete(additionalProperties, "reason")
delete(additionalProperties, "ref")
delete(additionalProperties, "score")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePrincipalMatch struct {
value *PrincipalMatch
isSet bool
}
func (v NullablePrincipalMatch) Get() *PrincipalMatch {
return v.value
}
func (v *NullablePrincipalMatch) Set(val *PrincipalMatch) {
v.value = val
v.isSet = true
}
func (v NullablePrincipalMatch) IsSet() bool {
return v.isSet
}
func (v *NullablePrincipalMatch) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePrincipalMatch(val *PrincipalMatch) *NullablePrincipalMatch {
return &NullablePrincipalMatch{value: val, isSet: true}
}
func (v NullablePrincipalMatch) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePrincipalMatch) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}