Files
sdk/model_trust_centre.go

649 lines
18 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 TrustCentre type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TrustCentre{}
// TrustCentre struct for TrustCentre
type TrustCentre struct {
// Controls is the control inventory, each entry naming what it asserts, the mechanism, where it is enforced, how it is verified and the clauses it maps to.
Controls []interface{} `json:"controls,omitempty"`
// Coverage is the per-framework counts, computed from Controls against each framework's whole published clause list.
Coverage []TrustCoverRow `json:"coverage,omitempty"`
// Documents are the artifacts, each saying whether this reader may read it.
Documents []TrustDocRow `json:"documents,omitempty"`
// Faq is the knowledge base — the questions a reviewer asks, answered.
Faq []interface{} `json:"faq,omitempty"`
// Frameworks are the clause universes the coverage is computed against.
Frameworks []TrustFrameworkRow `json:"frameworks,omitempty"`
// Generated is when this answer was computed, unix milliseconds.
Generated *int64 `json:"generated,omitempty"`
// Inventory is how the controls themselves stand, independent of framework.
Inventory *TrustTrustTally `json:"inventory,omitempty"`
// Org is whose centre this is.
Org *string `json:"org,omitempty"`
// Policies are the published policies.
Policies []interface{} `json:"policies,omitempty"`
Profile interface{} `json:"profile,omitempty"`
Risk interface{} `json:"risk,omitempty"`
// Subprocessors are the third parties this organization sends data to.
Subprocessors []interface{} `json:"subprocessors,omitempty"`
// Updates is the changelog, newest as the organization ordered it.
Updates []interface{} `json:"updates,omitempty"`
// Version is the embedded inventory's version.
Version *string `json:"version,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TrustCentre TrustCentre
// NewTrustCentre instantiates a new TrustCentre 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 NewTrustCentre() *TrustCentre {
this := TrustCentre{}
return &this
}
// NewTrustCentreWithDefaults instantiates a new TrustCentre 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 NewTrustCentreWithDefaults() *TrustCentre {
this := TrustCentre{}
return &this
}
// GetControls returns the Controls field value if set, zero value otherwise.
func (o *TrustCentre) 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 *TrustCentre) 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 *TrustCentre) 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 *TrustCentre) SetControls(v []interface{}) {
o.Controls = v
}
// GetCoverage returns the Coverage field value if set, zero value otherwise.
func (o *TrustCentre) GetCoverage() []TrustCoverRow {
if o == nil || IsNil(o.Coverage) {
var ret []TrustCoverRow
return ret
}
return o.Coverage
}
// GetCoverageOk returns a tuple with the Coverage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustCentre) GetCoverageOk() ([]TrustCoverRow, bool) {
if o == nil || IsNil(o.Coverage) {
return nil, false
}
return o.Coverage, true
}
// HasCoverage returns a boolean if a field has been set.
func (o *TrustCentre) HasCoverage() bool {
if o != nil && !IsNil(o.Coverage) {
return true
}
return false
}
// SetCoverage gets a reference to the given []TrustCoverRow and assigns it to the Coverage field.
func (o *TrustCentre) SetCoverage(v []TrustCoverRow) {
o.Coverage = v
}
// GetDocuments returns the Documents field value if set, zero value otherwise.
func (o *TrustCentre) GetDocuments() []TrustDocRow {
if o == nil || IsNil(o.Documents) {
var ret []TrustDocRow
return ret
}
return o.Documents
}
// GetDocumentsOk returns a tuple with the Documents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustCentre) GetDocumentsOk() ([]TrustDocRow, bool) {
if o == nil || IsNil(o.Documents) {
return nil, false
}
return o.Documents, true
}
// HasDocuments returns a boolean if a field has been set.
func (o *TrustCentre) HasDocuments() bool {
if o != nil && !IsNil(o.Documents) {
return true
}
return false
}
// SetDocuments gets a reference to the given []TrustDocRow and assigns it to the Documents field.
func (o *TrustCentre) SetDocuments(v []TrustDocRow) {
o.Documents = v
}
// GetFaq returns the Faq field value if set, zero value otherwise.
func (o *TrustCentre) GetFaq() []interface{} {
if o == nil || IsNil(o.Faq) {
var ret []interface{}
return ret
}
return o.Faq
}
// GetFaqOk returns a tuple with the Faq field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustCentre) GetFaqOk() ([]interface{}, bool) {
if o == nil || IsNil(o.Faq) {
return nil, false
}
return o.Faq, true
}
// HasFaq returns a boolean if a field has been set.
func (o *TrustCentre) HasFaq() bool {
if o != nil && !IsNil(o.Faq) {
return true
}
return false
}
// SetFaq gets a reference to the given []interface{} and assigns it to the Faq field.
func (o *TrustCentre) SetFaq(v []interface{}) {
o.Faq = v
}
// GetFrameworks returns the Frameworks field value if set, zero value otherwise.
func (o *TrustCentre) GetFrameworks() []TrustFrameworkRow {
if o == nil || IsNil(o.Frameworks) {
var ret []TrustFrameworkRow
return ret
}
return o.Frameworks
}
// GetFrameworksOk returns a tuple with the Frameworks field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustCentre) GetFrameworksOk() ([]TrustFrameworkRow, bool) {
if o == nil || IsNil(o.Frameworks) {
return nil, false
}
return o.Frameworks, true
}
// HasFrameworks returns a boolean if a field has been set.
func (o *TrustCentre) HasFrameworks() bool {
if o != nil && !IsNil(o.Frameworks) {
return true
}
return false
}
// SetFrameworks gets a reference to the given []TrustFrameworkRow and assigns it to the Frameworks field.
func (o *TrustCentre) SetFrameworks(v []TrustFrameworkRow) {
o.Frameworks = v
}
// GetGenerated returns the Generated field value if set, zero value otherwise.
func (o *TrustCentre) GetGenerated() int64 {
if o == nil || IsNil(o.Generated) {
var ret int64
return ret
}
return *o.Generated
}
// GetGeneratedOk returns a tuple with the Generated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustCentre) GetGeneratedOk() (*int64, bool) {
if o == nil || IsNil(o.Generated) {
return nil, false
}
return o.Generated, true
}
// HasGenerated returns a boolean if a field has been set.
func (o *TrustCentre) HasGenerated() bool {
if o != nil && !IsNil(o.Generated) {
return true
}
return false
}
// SetGenerated gets a reference to the given int64 and assigns it to the Generated field.
func (o *TrustCentre) SetGenerated(v int64) {
o.Generated = &v
}
// GetInventory returns the Inventory field value if set, zero value otherwise.
func (o *TrustCentre) GetInventory() TrustTrustTally {
if o == nil || IsNil(o.Inventory) {
var ret TrustTrustTally
return ret
}
return *o.Inventory
}
// GetInventoryOk returns a tuple with the Inventory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustCentre) GetInventoryOk() (*TrustTrustTally, bool) {
if o == nil || IsNil(o.Inventory) {
return nil, false
}
return o.Inventory, true
}
// HasInventory returns a boolean if a field has been set.
func (o *TrustCentre) HasInventory() bool {
if o != nil && !IsNil(o.Inventory) {
return true
}
return false
}
// SetInventory gets a reference to the given TrustTrustTally and assigns it to the Inventory field.
func (o *TrustCentre) SetInventory(v TrustTrustTally) {
o.Inventory = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *TrustCentre) 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 *TrustCentre) 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 *TrustCentre) 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 *TrustCentre) SetOrg(v string) {
o.Org = &v
}
// GetPolicies returns the Policies field value if set, zero value otherwise.
func (o *TrustCentre) GetPolicies() []interface{} {
if o == nil || IsNil(o.Policies) {
var ret []interface{}
return ret
}
return o.Policies
}
// GetPoliciesOk returns a tuple with the Policies field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustCentre) GetPoliciesOk() ([]interface{}, bool) {
if o == nil || IsNil(o.Policies) {
return nil, false
}
return o.Policies, true
}
// HasPolicies returns a boolean if a field has been set.
func (o *TrustCentre) HasPolicies() bool {
if o != nil && !IsNil(o.Policies) {
return true
}
return false
}
// SetPolicies gets a reference to the given []interface{} and assigns it to the Policies field.
func (o *TrustCentre) SetPolicies(v []interface{}) {
o.Policies = v
}
// GetProfile returns the Profile field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TrustCentre) GetProfile() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Profile
}
// GetProfileOk returns a tuple with the Profile 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 *TrustCentre) GetProfileOk() (*interface{}, bool) {
if o == nil || IsNil(o.Profile) {
return nil, false
}
return &o.Profile, true
}
// HasProfile returns a boolean if a field has been set.
func (o *TrustCentre) HasProfile() bool {
if o != nil && !IsNil(o.Profile) {
return true
}
return false
}
// SetProfile gets a reference to the given interface{} and assigns it to the Profile field.
func (o *TrustCentre) SetProfile(v interface{}) {
o.Profile = v
}
// GetRisk returns the Risk field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TrustCentre) GetRisk() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Risk
}
// GetRiskOk returns a tuple with the Risk 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 *TrustCentre) GetRiskOk() (*interface{}, bool) {
if o == nil || IsNil(o.Risk) {
return nil, false
}
return &o.Risk, true
}
// HasRisk returns a boolean if a field has been set.
func (o *TrustCentre) HasRisk() bool {
if o != nil && !IsNil(o.Risk) {
return true
}
return false
}
// SetRisk gets a reference to the given interface{} and assigns it to the Risk field.
func (o *TrustCentre) SetRisk(v interface{}) {
o.Risk = v
}
// GetSubprocessors returns the Subprocessors field value if set, zero value otherwise.
func (o *TrustCentre) GetSubprocessors() []interface{} {
if o == nil || IsNil(o.Subprocessors) {
var ret []interface{}
return ret
}
return o.Subprocessors
}
// GetSubprocessorsOk returns a tuple with the Subprocessors field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustCentre) GetSubprocessorsOk() ([]interface{}, bool) {
if o == nil || IsNil(o.Subprocessors) {
return nil, false
}
return o.Subprocessors, true
}
// HasSubprocessors returns a boolean if a field has been set.
func (o *TrustCentre) HasSubprocessors() bool {
if o != nil && !IsNil(o.Subprocessors) {
return true
}
return false
}
// SetSubprocessors gets a reference to the given []interface{} and assigns it to the Subprocessors field.
func (o *TrustCentre) SetSubprocessors(v []interface{}) {
o.Subprocessors = v
}
// GetUpdates returns the Updates field value if set, zero value otherwise.
func (o *TrustCentre) GetUpdates() []interface{} {
if o == nil || IsNil(o.Updates) {
var ret []interface{}
return ret
}
return o.Updates
}
// GetUpdatesOk returns a tuple with the Updates field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustCentre) GetUpdatesOk() ([]interface{}, bool) {
if o == nil || IsNil(o.Updates) {
return nil, false
}
return o.Updates, true
}
// HasUpdates returns a boolean if a field has been set.
func (o *TrustCentre) HasUpdates() bool {
if o != nil && !IsNil(o.Updates) {
return true
}
return false
}
// SetUpdates gets a reference to the given []interface{} and assigns it to the Updates field.
func (o *TrustCentre) SetUpdates(v []interface{}) {
o.Updates = v
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *TrustCentre) 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 *TrustCentre) 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 *TrustCentre) 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 *TrustCentre) SetVersion(v string) {
o.Version = &v
}
func (o TrustCentre) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TrustCentre) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Controls) {
toSerialize["controls"] = o.Controls
}
if !IsNil(o.Coverage) {
toSerialize["coverage"] = o.Coverage
}
if !IsNil(o.Documents) {
toSerialize["documents"] = o.Documents
}
if !IsNil(o.Faq) {
toSerialize["faq"] = o.Faq
}
if !IsNil(o.Frameworks) {
toSerialize["frameworks"] = o.Frameworks
}
if !IsNil(o.Generated) {
toSerialize["generated"] = o.Generated
}
if !IsNil(o.Inventory) {
toSerialize["inventory"] = o.Inventory
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Policies) {
toSerialize["policies"] = o.Policies
}
if o.Profile != nil {
toSerialize["profile"] = o.Profile
}
if o.Risk != nil {
toSerialize["risk"] = o.Risk
}
if !IsNil(o.Subprocessors) {
toSerialize["subprocessors"] = o.Subprocessors
}
if !IsNil(o.Updates) {
toSerialize["updates"] = o.Updates
}
if !IsNil(o.Version) {
toSerialize["version"] = o.Version
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TrustCentre) UnmarshalJSON(data []byte) (err error) {
varTrustCentre := _TrustCentre{}
err = json.Unmarshal(data, &varTrustCentre)
if err != nil {
return err
}
*o = TrustCentre(varTrustCentre)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "controls")
delete(additionalProperties, "coverage")
delete(additionalProperties, "documents")
delete(additionalProperties, "faq")
delete(additionalProperties, "frameworks")
delete(additionalProperties, "generated")
delete(additionalProperties, "inventory")
delete(additionalProperties, "org")
delete(additionalProperties, "policies")
delete(additionalProperties, "profile")
delete(additionalProperties, "risk")
delete(additionalProperties, "subprocessors")
delete(additionalProperties, "updates")
delete(additionalProperties, "version")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTrustCentre struct {
value *TrustCentre
isSet bool
}
func (v NullableTrustCentre) Get() *TrustCentre {
return v.value
}
func (v *NullableTrustCentre) Set(val *TrustCentre) {
v.value = val
v.isSet = true
}
func (v NullableTrustCentre) IsSet() bool {
return v.isSet
}
func (v *NullableTrustCentre) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTrustCentre(val *TrustCentre) *NullableTrustCentre {
return &NullableTrustCentre{value: val, isSet: true}
}
func (v NullableTrustCentre) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTrustCentre) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}