Files
sdk/model_trust_trust_coverage.go

269 lines
7.3 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 TrustTrustCoverage type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TrustTrustCoverage{}
// TrustTrustCoverage struct for TrustTrustCoverage
type TrustTrustCoverage struct {
// Controls is how the controls stand, independent of any framework.
Controls *TrustTrustTally `json:"controls,omitempty"`
// Frameworks is the per-framework counts.
Frameworks []TrustCoverRow `json:"frameworks,omitempty"`
// Generated is when this was computed, unix milliseconds.
Generated *int64 `json:"generated,omitempty"`
// Version is the embedded inventory's version.
Version *string `json:"version,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TrustTrustCoverage TrustTrustCoverage
// NewTrustTrustCoverage instantiates a new TrustTrustCoverage 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 NewTrustTrustCoverage() *TrustTrustCoverage {
this := TrustTrustCoverage{}
return &this
}
// NewTrustTrustCoverageWithDefaults instantiates a new TrustTrustCoverage 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 NewTrustTrustCoverageWithDefaults() *TrustTrustCoverage {
this := TrustTrustCoverage{}
return &this
}
// GetControls returns the Controls field value if set, zero value otherwise.
func (o *TrustTrustCoverage) GetControls() TrustTrustTally {
if o == nil || IsNil(o.Controls) {
var ret TrustTrustTally
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 *TrustTrustCoverage) GetControlsOk() (*TrustTrustTally, 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 *TrustTrustCoverage) HasControls() bool {
if o != nil && !IsNil(o.Controls) {
return true
}
return false
}
// SetControls gets a reference to the given TrustTrustTally and assigns it to the Controls field.
func (o *TrustTrustCoverage) SetControls(v TrustTrustTally) {
o.Controls = &v
}
// GetFrameworks returns the Frameworks field value if set, zero value otherwise.
func (o *TrustTrustCoverage) GetFrameworks() []TrustCoverRow {
if o == nil || IsNil(o.Frameworks) {
var ret []TrustCoverRow
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 *TrustTrustCoverage) GetFrameworksOk() ([]TrustCoverRow, 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 *TrustTrustCoverage) HasFrameworks() bool {
if o != nil && !IsNil(o.Frameworks) {
return true
}
return false
}
// SetFrameworks gets a reference to the given []TrustCoverRow and assigns it to the Frameworks field.
func (o *TrustTrustCoverage) SetFrameworks(v []TrustCoverRow) {
o.Frameworks = v
}
// GetGenerated returns the Generated field value if set, zero value otherwise.
func (o *TrustTrustCoverage) 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 *TrustTrustCoverage) 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 *TrustTrustCoverage) 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 *TrustTrustCoverage) SetGenerated(v int64) {
o.Generated = &v
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *TrustTrustCoverage) 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 *TrustTrustCoverage) 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 *TrustTrustCoverage) 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 *TrustTrustCoverage) SetVersion(v string) {
o.Version = &v
}
func (o TrustTrustCoverage) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TrustTrustCoverage) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Controls) {
toSerialize["controls"] = o.Controls
}
if !IsNil(o.Frameworks) {
toSerialize["frameworks"] = o.Frameworks
}
if !IsNil(o.Generated) {
toSerialize["generated"] = o.Generated
}
if !IsNil(o.Version) {
toSerialize["version"] = o.Version
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TrustTrustCoverage) UnmarshalJSON(data []byte) (err error) {
varTrustTrustCoverage := _TrustTrustCoverage{}
err = json.Unmarshal(data, &varTrustTrustCoverage)
if err != nil {
return err
}
*o = TrustTrustCoverage(varTrustTrustCoverage)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "controls")
delete(additionalProperties, "frameworks")
delete(additionalProperties, "generated")
delete(additionalProperties, "version")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTrustTrustCoverage struct {
value *TrustTrustCoverage
isSet bool
}
func (v NullableTrustTrustCoverage) Get() *TrustTrustCoverage {
return v.value
}
func (v *NullableTrustTrustCoverage) Set(val *TrustTrustCoverage) {
v.value = val
v.isSet = true
}
func (v NullableTrustTrustCoverage) IsSet() bool {
return v.isSet
}
func (v *NullableTrustTrustCoverage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTrustTrustCoverage(val *TrustTrustCoverage) *NullableTrustTrustCoverage {
return &NullableTrustTrustCoverage{value: val, isSet: true}
}
func (v NullableTrustTrustCoverage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTrustTrustCoverage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}