Files
sdk/model_trust_framework_row.go

383 lines
10 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 TrustFrameworkRow type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TrustFrameworkRow{}
// TrustFrameworkRow struct for TrustFrameworkRow
type TrustFrameworkRow struct {
// Edition is which edition this clause list is taken from.
Edition *string `json:"edition,omitempty"`
// Framework is the framework id.
Framework *string `json:"framework,omitempty"`
// Name is the published standard's name.
Name *string `json:"name,omitempty"`
// Publisher is who publishes it.
Publisher *string `json:"publisher,omitempty"`
// Total is how many clauses the standard publishes.
Total *int64 `json:"total,omitempty"`
// Unit is what one clause is; Units is its plural.
Unit *string `json:"unit,omitempty"`
// Units is Unit's plural, carried so a caller renders \"12 controls\" without having to pluralise a word it does not know.
Units *string `json:"units,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TrustFrameworkRow TrustFrameworkRow
// NewTrustFrameworkRow instantiates a new TrustFrameworkRow 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 NewTrustFrameworkRow() *TrustFrameworkRow {
this := TrustFrameworkRow{}
return &this
}
// NewTrustFrameworkRowWithDefaults instantiates a new TrustFrameworkRow 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 NewTrustFrameworkRowWithDefaults() *TrustFrameworkRow {
this := TrustFrameworkRow{}
return &this
}
// GetEdition returns the Edition field value if set, zero value otherwise.
func (o *TrustFrameworkRow) GetEdition() string {
if o == nil || IsNil(o.Edition) {
var ret string
return ret
}
return *o.Edition
}
// GetEditionOk returns a tuple with the Edition field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustFrameworkRow) GetEditionOk() (*string, bool) {
if o == nil || IsNil(o.Edition) {
return nil, false
}
return o.Edition, true
}
// HasEdition returns a boolean if a field has been set.
func (o *TrustFrameworkRow) HasEdition() bool {
if o != nil && !IsNil(o.Edition) {
return true
}
return false
}
// SetEdition gets a reference to the given string and assigns it to the Edition field.
func (o *TrustFrameworkRow) SetEdition(v string) {
o.Edition = &v
}
// GetFramework returns the Framework field value if set, zero value otherwise.
func (o *TrustFrameworkRow) GetFramework() string {
if o == nil || IsNil(o.Framework) {
var ret string
return ret
}
return *o.Framework
}
// GetFrameworkOk returns a tuple with the Framework field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustFrameworkRow) GetFrameworkOk() (*string, bool) {
if o == nil || IsNil(o.Framework) {
return nil, false
}
return o.Framework, true
}
// HasFramework returns a boolean if a field has been set.
func (o *TrustFrameworkRow) HasFramework() bool {
if o != nil && !IsNil(o.Framework) {
return true
}
return false
}
// SetFramework gets a reference to the given string and assigns it to the Framework field.
func (o *TrustFrameworkRow) SetFramework(v string) {
o.Framework = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *TrustFrameworkRow) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustFrameworkRow) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *TrustFrameworkRow) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *TrustFrameworkRow) SetName(v string) {
o.Name = &v
}
// GetPublisher returns the Publisher field value if set, zero value otherwise.
func (o *TrustFrameworkRow) GetPublisher() string {
if o == nil || IsNil(o.Publisher) {
var ret string
return ret
}
return *o.Publisher
}
// GetPublisherOk returns a tuple with the Publisher field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustFrameworkRow) GetPublisherOk() (*string, bool) {
if o == nil || IsNil(o.Publisher) {
return nil, false
}
return o.Publisher, true
}
// HasPublisher returns a boolean if a field has been set.
func (o *TrustFrameworkRow) HasPublisher() bool {
if o != nil && !IsNil(o.Publisher) {
return true
}
return false
}
// SetPublisher gets a reference to the given string and assigns it to the Publisher field.
func (o *TrustFrameworkRow) SetPublisher(v string) {
o.Publisher = &v
}
// GetTotal returns the Total field value if set, zero value otherwise.
func (o *TrustFrameworkRow) 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 *TrustFrameworkRow) 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 *TrustFrameworkRow) 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 *TrustFrameworkRow) SetTotal(v int64) {
o.Total = &v
}
// GetUnit returns the Unit field value if set, zero value otherwise.
func (o *TrustFrameworkRow) GetUnit() string {
if o == nil || IsNil(o.Unit) {
var ret string
return ret
}
return *o.Unit
}
// GetUnitOk returns a tuple with the Unit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustFrameworkRow) GetUnitOk() (*string, bool) {
if o == nil || IsNil(o.Unit) {
return nil, false
}
return o.Unit, true
}
// HasUnit returns a boolean if a field has been set.
func (o *TrustFrameworkRow) HasUnit() bool {
if o != nil && !IsNil(o.Unit) {
return true
}
return false
}
// SetUnit gets a reference to the given string and assigns it to the Unit field.
func (o *TrustFrameworkRow) SetUnit(v string) {
o.Unit = &v
}
// GetUnits returns the Units field value if set, zero value otherwise.
func (o *TrustFrameworkRow) GetUnits() string {
if o == nil || IsNil(o.Units) {
var ret string
return ret
}
return *o.Units
}
// GetUnitsOk returns a tuple with the Units field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustFrameworkRow) GetUnitsOk() (*string, bool) {
if o == nil || IsNil(o.Units) {
return nil, false
}
return o.Units, true
}
// HasUnits returns a boolean if a field has been set.
func (o *TrustFrameworkRow) HasUnits() bool {
if o != nil && !IsNil(o.Units) {
return true
}
return false
}
// SetUnits gets a reference to the given string and assigns it to the Units field.
func (o *TrustFrameworkRow) SetUnits(v string) {
o.Units = &v
}
func (o TrustFrameworkRow) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TrustFrameworkRow) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Edition) {
toSerialize["edition"] = o.Edition
}
if !IsNil(o.Framework) {
toSerialize["framework"] = o.Framework
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Publisher) {
toSerialize["publisher"] = o.Publisher
}
if !IsNil(o.Total) {
toSerialize["total"] = o.Total
}
if !IsNil(o.Unit) {
toSerialize["unit"] = o.Unit
}
if !IsNil(o.Units) {
toSerialize["units"] = o.Units
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TrustFrameworkRow) UnmarshalJSON(data []byte) (err error) {
varTrustFrameworkRow := _TrustFrameworkRow{}
err = json.Unmarshal(data, &varTrustFrameworkRow)
if err != nil {
return err
}
*o = TrustFrameworkRow(varTrustFrameworkRow)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "edition")
delete(additionalProperties, "framework")
delete(additionalProperties, "name")
delete(additionalProperties, "publisher")
delete(additionalProperties, "total")
delete(additionalProperties, "unit")
delete(additionalProperties, "units")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTrustFrameworkRow struct {
value *TrustFrameworkRow
isSet bool
}
func (v NullableTrustFrameworkRow) Get() *TrustFrameworkRow {
return v.value
}
func (v *NullableTrustFrameworkRow) Set(val *TrustFrameworkRow) {
v.value = val
v.isSet = true
}
func (v NullableTrustFrameworkRow) IsSet() bool {
return v.isSet
}
func (v *NullableTrustFrameworkRow) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTrustFrameworkRow(val *TrustFrameworkRow) *NullableTrustFrameworkRow {
return &NullableTrustFrameworkRow{value: val, isSet: true}
}
func (v NullableTrustFrameworkRow) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTrustFrameworkRow) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}