mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
497 lines
13 KiB
Go
497 lines
13 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 TrustDocRow type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TrustDocRow{}
|
|
|
|
// TrustDocRow struct for TrustDocRow
|
|
type TrustDocRow struct {
|
|
// Attested reports whether somebody OUTSIDE this organization put their name to it. Those are the artifacts a reviewer asks for, and they are released through a grant rather than published — there is no field that can say otherwise.
|
|
Attested *bool `json:"attested,omitempty"`
|
|
// Href is where to read it, present only when this reader may.
|
|
Href *string `json:"href,omitempty"`
|
|
// ID is the document's id within this organization's centre.
|
|
Id *string `json:"id,omitempty"`
|
|
// Kind is the artifact type — soc2, iso, pentest, letter, caiq, sig, vsa, questionnaire, policy or other.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Label is the artifact type in words, for rendering.
|
|
Label *string `json:"label,omitempty"`
|
|
// Note is anything the organization says about this artifact.
|
|
Note *string `json:"note,omitempty"`
|
|
// Released reports whether THIS reader may read it. False means the artifact exists and is available on request.
|
|
Released *bool `json:"released,omitempty"`
|
|
// Tier is \"public\" or \"gated\". It defaults to gated, so a new artifact is closed until somebody opens it deliberately.
|
|
Tier *string `json:"tier,omitempty"`
|
|
// Title is what the document is called.
|
|
Title *string `json:"title,omitempty"`
|
|
// Updated is when the record last changed, unix milliseconds.
|
|
Updated *int64 `json:"updated,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TrustDocRow TrustDocRow
|
|
|
|
// NewTrustDocRow instantiates a new TrustDocRow 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 NewTrustDocRow() *TrustDocRow {
|
|
this := TrustDocRow{}
|
|
return &this
|
|
}
|
|
|
|
// NewTrustDocRowWithDefaults instantiates a new TrustDocRow 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 NewTrustDocRowWithDefaults() *TrustDocRow {
|
|
this := TrustDocRow{}
|
|
return &this
|
|
}
|
|
|
|
// GetAttested returns the Attested field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetAttested() bool {
|
|
if o == nil || IsNil(o.Attested) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Attested
|
|
}
|
|
|
|
// GetAttestedOk returns a tuple with the Attested field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetAttestedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Attested) {
|
|
return nil, false
|
|
}
|
|
return o.Attested, true
|
|
}
|
|
|
|
// HasAttested returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasAttested() bool {
|
|
if o != nil && !IsNil(o.Attested) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAttested gets a reference to the given bool and assigns it to the Attested field.
|
|
func (o *TrustDocRow) SetAttested(v bool) {
|
|
o.Attested = &v
|
|
}
|
|
|
|
// GetHref returns the Href field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetHref() string {
|
|
if o == nil || IsNil(o.Href) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Href
|
|
}
|
|
|
|
// GetHrefOk returns a tuple with the Href field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetHrefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Href) {
|
|
return nil, false
|
|
}
|
|
return o.Href, true
|
|
}
|
|
|
|
// HasHref returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasHref() bool {
|
|
if o != nil && !IsNil(o.Href) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHref gets a reference to the given string and assigns it to the Href field.
|
|
func (o *TrustDocRow) SetHref(v string) {
|
|
o.Href = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *TrustDocRow) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *TrustDocRow) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetLabel returns the Label field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetLabel() string {
|
|
if o == nil || IsNil(o.Label) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Label
|
|
}
|
|
|
|
// GetLabelOk returns a tuple with the Label field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetLabelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Label) {
|
|
return nil, false
|
|
}
|
|
return o.Label, true
|
|
}
|
|
|
|
// HasLabel returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasLabel() bool {
|
|
if o != nil && !IsNil(o.Label) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLabel gets a reference to the given string and assigns it to the Label field.
|
|
func (o *TrustDocRow) SetLabel(v string) {
|
|
o.Label = &v
|
|
}
|
|
|
|
// GetNote returns the Note field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetNote() string {
|
|
if o == nil || IsNil(o.Note) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Note
|
|
}
|
|
|
|
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetNoteOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Note) {
|
|
return nil, false
|
|
}
|
|
return o.Note, true
|
|
}
|
|
|
|
// HasNote returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasNote() bool {
|
|
if o != nil && !IsNil(o.Note) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNote gets a reference to the given string and assigns it to the Note field.
|
|
func (o *TrustDocRow) SetNote(v string) {
|
|
o.Note = &v
|
|
}
|
|
|
|
// GetReleased returns the Released field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetReleased() bool {
|
|
if o == nil || IsNil(o.Released) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Released
|
|
}
|
|
|
|
// GetReleasedOk returns a tuple with the Released field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetReleasedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Released) {
|
|
return nil, false
|
|
}
|
|
return o.Released, true
|
|
}
|
|
|
|
// HasReleased returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasReleased() bool {
|
|
if o != nil && !IsNil(o.Released) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReleased gets a reference to the given bool and assigns it to the Released field.
|
|
func (o *TrustDocRow) SetReleased(v bool) {
|
|
o.Released = &v
|
|
}
|
|
|
|
// GetTier returns the Tier field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetTier() string {
|
|
if o == nil || IsNil(o.Tier) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Tier
|
|
}
|
|
|
|
// GetTierOk returns a tuple with the Tier field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetTierOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Tier) {
|
|
return nil, false
|
|
}
|
|
return o.Tier, true
|
|
}
|
|
|
|
// HasTier returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasTier() bool {
|
|
if o != nil && !IsNil(o.Tier) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTier gets a reference to the given string and assigns it to the Tier field.
|
|
func (o *TrustDocRow) SetTier(v string) {
|
|
o.Tier = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetTitle() string {
|
|
if o == nil || IsNil(o.Title) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetTitleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Title) {
|
|
return nil, false
|
|
}
|
|
return o.Title, true
|
|
}
|
|
|
|
// HasTitle returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasTitle() bool {
|
|
if o != nil && !IsNil(o.Title) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTitle gets a reference to the given string and assigns it to the Title field.
|
|
func (o *TrustDocRow) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetUpdated returns the Updated field value if set, zero value otherwise.
|
|
func (o *TrustDocRow) GetUpdated() int64 {
|
|
if o == nil || IsNil(o.Updated) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Updated
|
|
}
|
|
|
|
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrustDocRow) GetUpdatedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Updated) {
|
|
return nil, false
|
|
}
|
|
return o.Updated, true
|
|
}
|
|
|
|
// HasUpdated returns a boolean if a field has been set.
|
|
func (o *TrustDocRow) HasUpdated() bool {
|
|
if o != nil && !IsNil(o.Updated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdated gets a reference to the given int64 and assigns it to the Updated field.
|
|
func (o *TrustDocRow) SetUpdated(v int64) {
|
|
o.Updated = &v
|
|
}
|
|
|
|
func (o TrustDocRow) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TrustDocRow) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Attested) {
|
|
toSerialize["attested"] = o.Attested
|
|
}
|
|
if !IsNil(o.Href) {
|
|
toSerialize["href"] = o.Href
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Label) {
|
|
toSerialize["label"] = o.Label
|
|
}
|
|
if !IsNil(o.Note) {
|
|
toSerialize["note"] = o.Note
|
|
}
|
|
if !IsNil(o.Released) {
|
|
toSerialize["released"] = o.Released
|
|
}
|
|
if !IsNil(o.Tier) {
|
|
toSerialize["tier"] = o.Tier
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
if !IsNil(o.Updated) {
|
|
toSerialize["updated"] = o.Updated
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TrustDocRow) UnmarshalJSON(data []byte) (err error) {
|
|
varTrustDocRow := _TrustDocRow{}
|
|
|
|
err = json.Unmarshal(data, &varTrustDocRow)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TrustDocRow(varTrustDocRow)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "attested")
|
|
delete(additionalProperties, "href")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "label")
|
|
delete(additionalProperties, "note")
|
|
delete(additionalProperties, "released")
|
|
delete(additionalProperties, "tier")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "updated")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTrustDocRow struct {
|
|
value *TrustDocRow
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTrustDocRow) Get() *TrustDocRow {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTrustDocRow) Set(val *TrustDocRow) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTrustDocRow) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTrustDocRow) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTrustDocRow(val *TrustDocRow) *NullableTrustDocRow {
|
|
return &NullableTrustDocRow{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTrustDocRow) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTrustDocRow) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|