Files
sdk/model_principal_screening.go

307 lines
8.2 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 PrincipalScreening type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PrincipalScreening{}
// PrincipalScreening struct for PrincipalScreening
type PrincipalScreening struct {
// At is when it ran, unix seconds.
At *int64 `json:"at,omitempty"`
// Lists is each publisher's readiness at the moment of screening.
Lists []PrincipalList `json:"lists,omitempty"`
// Matches are what matched — answered to the org's own admins and to a reviewer, never to another org.
Matches []PrincipalMatch `json:"matches,omitempty"`
// Reason says why, in words.
Reason *string `json:"reason,omitempty"`
// Status is clear, review (a possible match awaits a platform reviewer), blocked (a confirmed match), unscreened (the org states nothing to screen), or unavailable (the lists are not fit to screen against).
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PrincipalScreening PrincipalScreening
// NewPrincipalScreening instantiates a new PrincipalScreening 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 NewPrincipalScreening() *PrincipalScreening {
this := PrincipalScreening{}
return &this
}
// NewPrincipalScreeningWithDefaults instantiates a new PrincipalScreening 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 NewPrincipalScreeningWithDefaults() *PrincipalScreening {
this := PrincipalScreening{}
return &this
}
// GetAt returns the At field value if set, zero value otherwise.
func (o *PrincipalScreening) GetAt() int64 {
if o == nil || IsNil(o.At) {
var ret int64
return ret
}
return *o.At
}
// GetAtOk returns a tuple with the At field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalScreening) GetAtOk() (*int64, bool) {
if o == nil || IsNil(o.At) {
return nil, false
}
return o.At, true
}
// HasAt returns a boolean if a field has been set.
func (o *PrincipalScreening) HasAt() bool {
if o != nil && !IsNil(o.At) {
return true
}
return false
}
// SetAt gets a reference to the given int64 and assigns it to the At field.
func (o *PrincipalScreening) SetAt(v int64) {
o.At = &v
}
// GetLists returns the Lists field value if set, zero value otherwise.
func (o *PrincipalScreening) GetLists() []PrincipalList {
if o == nil || IsNil(o.Lists) {
var ret []PrincipalList
return ret
}
return o.Lists
}
// GetListsOk returns a tuple with the Lists field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalScreening) GetListsOk() ([]PrincipalList, bool) {
if o == nil || IsNil(o.Lists) {
return nil, false
}
return o.Lists, true
}
// HasLists returns a boolean if a field has been set.
func (o *PrincipalScreening) HasLists() bool {
if o != nil && !IsNil(o.Lists) {
return true
}
return false
}
// SetLists gets a reference to the given []PrincipalList and assigns it to the Lists field.
func (o *PrincipalScreening) SetLists(v []PrincipalList) {
o.Lists = v
}
// GetMatches returns the Matches field value if set, zero value otherwise.
func (o *PrincipalScreening) GetMatches() []PrincipalMatch {
if o == nil || IsNil(o.Matches) {
var ret []PrincipalMatch
return ret
}
return o.Matches
}
// GetMatchesOk returns a tuple with the Matches field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalScreening) GetMatchesOk() ([]PrincipalMatch, bool) {
if o == nil || IsNil(o.Matches) {
return nil, false
}
return o.Matches, true
}
// HasMatches returns a boolean if a field has been set.
func (o *PrincipalScreening) HasMatches() bool {
if o != nil && !IsNil(o.Matches) {
return true
}
return false
}
// SetMatches gets a reference to the given []PrincipalMatch and assigns it to the Matches field.
func (o *PrincipalScreening) SetMatches(v []PrincipalMatch) {
o.Matches = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *PrincipalScreening) 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 *PrincipalScreening) 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 *PrincipalScreening) 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 *PrincipalScreening) SetReason(v string) {
o.Reason = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *PrincipalScreening) 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 *PrincipalScreening) 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 *PrincipalScreening) 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 *PrincipalScreening) SetStatus(v string) {
o.Status = &v
}
func (o PrincipalScreening) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PrincipalScreening) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.At) {
toSerialize["at"] = o.At
}
if !IsNil(o.Lists) {
toSerialize["lists"] = o.Lists
}
if !IsNil(o.Matches) {
toSerialize["matches"] = o.Matches
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PrincipalScreening) UnmarshalJSON(data []byte) (err error) {
varPrincipalScreening := _PrincipalScreening{}
err = json.Unmarshal(data, &varPrincipalScreening)
if err != nil {
return err
}
*o = PrincipalScreening(varPrincipalScreening)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "at")
delete(additionalProperties, "lists")
delete(additionalProperties, "matches")
delete(additionalProperties, "reason")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePrincipalScreening struct {
value *PrincipalScreening
isSet bool
}
func (v NullablePrincipalScreening) Get() *PrincipalScreening {
return v.value
}
func (v *NullablePrincipalScreening) Set(val *PrincipalScreening) {
v.value = val
v.isSet = true
}
func (v NullablePrincipalScreening) IsSet() bool {
return v.isSet
}
func (v *NullablePrincipalScreening) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePrincipalScreening(val *PrincipalScreening) *NullablePrincipalScreening {
return &NullablePrincipalScreening{value: val, isSet: true}
}
func (v NullablePrincipalScreening) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePrincipalScreening) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}