Files
sdk/model_trust_control_list.go

421 lines
11 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 TrustControlList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TrustControlList{}
// TrustControlList struct for TrustControlList
type TrustControlList struct {
// Absent is how many the organization does not have. Each still names the clause it would satisfy, and none of them moves a coverage number.
Absent *int64 `json:"absent,omitempty"`
// Automated is how many run with nobody in the loop.
Automated *int64 `json:"automated,omitempty"`
// Controls is every control, opaque because the organization owns its shape.
Controls []interface{} `json:"controls,omitempty"`
// Partial is how many run but do not cover their whole claim.
Partial *int64 `json:"partial,omitempty"`
// Statement is the counts as one sentence, safe to quote.
Statement *string `json:"statement,omitempty"`
// Total is how many controls this organization publishes.
Total *int64 `json:"total,omitempty"`
// Unverified is how many rest on somebody having read the source rather than on a test or an audit row.
Unverified *int64 `json:"unverified,omitempty"`
// Version is the embedded inventory's version.
Version *string `json:"version,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TrustControlList TrustControlList
// NewTrustControlList instantiates a new TrustControlList 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 NewTrustControlList() *TrustControlList {
this := TrustControlList{}
return &this
}
// NewTrustControlListWithDefaults instantiates a new TrustControlList 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 NewTrustControlListWithDefaults() *TrustControlList {
this := TrustControlList{}
return &this
}
// GetAbsent returns the Absent field value if set, zero value otherwise.
func (o *TrustControlList) GetAbsent() int64 {
if o == nil || IsNil(o.Absent) {
var ret int64
return ret
}
return *o.Absent
}
// GetAbsentOk returns a tuple with the Absent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustControlList) GetAbsentOk() (*int64, bool) {
if o == nil || IsNil(o.Absent) {
return nil, false
}
return o.Absent, true
}
// HasAbsent returns a boolean if a field has been set.
func (o *TrustControlList) HasAbsent() bool {
if o != nil && !IsNil(o.Absent) {
return true
}
return false
}
// SetAbsent gets a reference to the given int64 and assigns it to the Absent field.
func (o *TrustControlList) SetAbsent(v int64) {
o.Absent = &v
}
// GetAutomated returns the Automated field value if set, zero value otherwise.
func (o *TrustControlList) GetAutomated() int64 {
if o == nil || IsNil(o.Automated) {
var ret int64
return ret
}
return *o.Automated
}
// GetAutomatedOk returns a tuple with the Automated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustControlList) GetAutomatedOk() (*int64, bool) {
if o == nil || IsNil(o.Automated) {
return nil, false
}
return o.Automated, true
}
// HasAutomated returns a boolean if a field has been set.
func (o *TrustControlList) HasAutomated() bool {
if o != nil && !IsNil(o.Automated) {
return true
}
return false
}
// SetAutomated gets a reference to the given int64 and assigns it to the Automated field.
func (o *TrustControlList) SetAutomated(v int64) {
o.Automated = &v
}
// GetControls returns the Controls field value if set, zero value otherwise.
func (o *TrustControlList) GetControls() []interface{} {
if o == nil || IsNil(o.Controls) {
var ret []interface{}
return ret
}
return o.Controls
}
// GetControlsOk returns a tuple with the Controls field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustControlList) GetControlsOk() ([]interface{}, bool) {
if o == nil || IsNil(o.Controls) {
return nil, false
}
return o.Controls, true
}
// HasControls returns a boolean if a field has been set.
func (o *TrustControlList) HasControls() bool {
if o != nil && !IsNil(o.Controls) {
return true
}
return false
}
// SetControls gets a reference to the given []interface{} and assigns it to the Controls field.
func (o *TrustControlList) SetControls(v []interface{}) {
o.Controls = v
}
// GetPartial returns the Partial field value if set, zero value otherwise.
func (o *TrustControlList) GetPartial() int64 {
if o == nil || IsNil(o.Partial) {
var ret int64
return ret
}
return *o.Partial
}
// GetPartialOk returns a tuple with the Partial field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustControlList) GetPartialOk() (*int64, bool) {
if o == nil || IsNil(o.Partial) {
return nil, false
}
return o.Partial, true
}
// HasPartial returns a boolean if a field has been set.
func (o *TrustControlList) HasPartial() bool {
if o != nil && !IsNil(o.Partial) {
return true
}
return false
}
// SetPartial gets a reference to the given int64 and assigns it to the Partial field.
func (o *TrustControlList) SetPartial(v int64) {
o.Partial = &v
}
// GetStatement returns the Statement field value if set, zero value otherwise.
func (o *TrustControlList) GetStatement() string {
if o == nil || IsNil(o.Statement) {
var ret string
return ret
}
return *o.Statement
}
// GetStatementOk returns a tuple with the Statement field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustControlList) GetStatementOk() (*string, bool) {
if o == nil || IsNil(o.Statement) {
return nil, false
}
return o.Statement, true
}
// HasStatement returns a boolean if a field has been set.
func (o *TrustControlList) HasStatement() bool {
if o != nil && !IsNil(o.Statement) {
return true
}
return false
}
// SetStatement gets a reference to the given string and assigns it to the Statement field.
func (o *TrustControlList) SetStatement(v string) {
o.Statement = &v
}
// GetTotal returns the Total field value if set, zero value otherwise.
func (o *TrustControlList) GetTotal() int64 {
if o == nil || IsNil(o.Total) {
var ret int64
return ret
}
return *o.Total
}
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustControlList) GetTotalOk() (*int64, bool) {
if o == nil || IsNil(o.Total) {
return nil, false
}
return o.Total, true
}
// HasTotal returns a boolean if a field has been set.
func (o *TrustControlList) HasTotal() bool {
if o != nil && !IsNil(o.Total) {
return true
}
return false
}
// SetTotal gets a reference to the given int64 and assigns it to the Total field.
func (o *TrustControlList) SetTotal(v int64) {
o.Total = &v
}
// GetUnverified returns the Unverified field value if set, zero value otherwise.
func (o *TrustControlList) GetUnverified() int64 {
if o == nil || IsNil(o.Unverified) {
var ret int64
return ret
}
return *o.Unverified
}
// GetUnverifiedOk returns a tuple with the Unverified field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustControlList) GetUnverifiedOk() (*int64, bool) {
if o == nil || IsNil(o.Unverified) {
return nil, false
}
return o.Unverified, true
}
// HasUnverified returns a boolean if a field has been set.
func (o *TrustControlList) HasUnverified() bool {
if o != nil && !IsNil(o.Unverified) {
return true
}
return false
}
// SetUnverified gets a reference to the given int64 and assigns it to the Unverified field.
func (o *TrustControlList) SetUnverified(v int64) {
o.Unverified = &v
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *TrustControlList) GetVersion() string {
if o == nil || IsNil(o.Version) {
var ret string
return ret
}
return *o.Version
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustControlList) GetVersionOk() (*string, bool) {
if o == nil || IsNil(o.Version) {
return nil, false
}
return o.Version, true
}
// HasVersion returns a boolean if a field has been set.
func (o *TrustControlList) HasVersion() bool {
if o != nil && !IsNil(o.Version) {
return true
}
return false
}
// SetVersion gets a reference to the given string and assigns it to the Version field.
func (o *TrustControlList) SetVersion(v string) {
o.Version = &v
}
func (o TrustControlList) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TrustControlList) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Absent) {
toSerialize["absent"] = o.Absent
}
if !IsNil(o.Automated) {
toSerialize["automated"] = o.Automated
}
if !IsNil(o.Controls) {
toSerialize["controls"] = o.Controls
}
if !IsNil(o.Partial) {
toSerialize["partial"] = o.Partial
}
if !IsNil(o.Statement) {
toSerialize["statement"] = o.Statement
}
if !IsNil(o.Total) {
toSerialize["total"] = o.Total
}
if !IsNil(o.Unverified) {
toSerialize["unverified"] = o.Unverified
}
if !IsNil(o.Version) {
toSerialize["version"] = o.Version
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TrustControlList) UnmarshalJSON(data []byte) (err error) {
varTrustControlList := _TrustControlList{}
err = json.Unmarshal(data, &varTrustControlList)
if err != nil {
return err
}
*o = TrustControlList(varTrustControlList)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "absent")
delete(additionalProperties, "automated")
delete(additionalProperties, "controls")
delete(additionalProperties, "partial")
delete(additionalProperties, "statement")
delete(additionalProperties, "total")
delete(additionalProperties, "unverified")
delete(additionalProperties, "version")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTrustControlList struct {
value *TrustControlList
isSet bool
}
func (v NullableTrustControlList) Get() *TrustControlList {
return v.value
}
func (v *NullableTrustControlList) Set(val *TrustControlList) {
v.value = val
v.isSet = true
}
func (v NullableTrustControlList) IsSet() bool {
return v.isSet
}
func (v *NullableTrustControlList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTrustControlList(val *TrustControlList) *NullableTrustControlList {
return &NullableTrustControlList{value: val, isSet: true}
}
func (v NullableTrustControlList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTrustControlList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}