mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
561 lines
14 KiB
Go
561 lines
14 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 Graph type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Graph{}
|
|
|
|
// Graph struct for Graph
|
|
type Graph struct {
|
|
Category *string `json:"category,omitempty"`
|
|
CreatedTime *string `json:"createdTime,omitempty"`
|
|
Density *int32 `json:"density,omitempty"`
|
|
DisplayName *string `json:"displayName,omitempty"`
|
|
EndTime *string `json:"endTime,omitempty"`
|
|
ErrorText *string `json:"errorText,omitempty"`
|
|
Layout *string `json:"layout,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Owner *string `json:"owner,omitempty"`
|
|
StartTime *string `json:"startTime,omitempty"`
|
|
Store *string `json:"store,omitempty"`
|
|
Text *string `json:"text,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _Graph Graph
|
|
|
|
// NewGraph instantiates a new Graph 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 NewGraph() *Graph {
|
|
this := Graph{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphWithDefaults instantiates a new Graph 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 NewGraphWithDefaults() *Graph {
|
|
this := Graph{}
|
|
return &this
|
|
}
|
|
|
|
// GetCategory returns the Category field value if set, zero value otherwise.
|
|
func (o *Graph) GetCategory() string {
|
|
if o == nil || IsNil(o.Category) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Category
|
|
}
|
|
|
|
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetCategoryOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Category) {
|
|
return nil, false
|
|
}
|
|
return o.Category, true
|
|
}
|
|
|
|
// HasCategory returns a boolean if a field has been set.
|
|
func (o *Graph) HasCategory() bool {
|
|
if o != nil && !IsNil(o.Category) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCategory gets a reference to the given string and assigns it to the Category field.
|
|
func (o *Graph) SetCategory(v string) {
|
|
o.Category = &v
|
|
}
|
|
|
|
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
|
|
func (o *Graph) GetCreatedTime() string {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedTime
|
|
}
|
|
|
|
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetCreatedTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedTime, true
|
|
}
|
|
|
|
// HasCreatedTime returns a boolean if a field has been set.
|
|
func (o *Graph) HasCreatedTime() bool {
|
|
if o != nil && !IsNil(o.CreatedTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
|
|
func (o *Graph) SetCreatedTime(v string) {
|
|
o.CreatedTime = &v
|
|
}
|
|
|
|
// GetDensity returns the Density field value if set, zero value otherwise.
|
|
func (o *Graph) GetDensity() int32 {
|
|
if o == nil || IsNil(o.Density) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Density
|
|
}
|
|
|
|
// GetDensityOk returns a tuple with the Density field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetDensityOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Density) {
|
|
return nil, false
|
|
}
|
|
return o.Density, true
|
|
}
|
|
|
|
// HasDensity returns a boolean if a field has been set.
|
|
func (o *Graph) HasDensity() bool {
|
|
if o != nil && !IsNil(o.Density) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDensity gets a reference to the given int32 and assigns it to the Density field.
|
|
func (o *Graph) SetDensity(v int32) {
|
|
o.Density = &v
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
|
func (o *Graph) GetDisplayName() string {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DisplayName
|
|
}
|
|
|
|
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetDisplayNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
return nil, false
|
|
}
|
|
return o.DisplayName, true
|
|
}
|
|
|
|
// HasDisplayName returns a boolean if a field has been set.
|
|
func (o *Graph) HasDisplayName() bool {
|
|
if o != nil && !IsNil(o.DisplayName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
|
func (o *Graph) SetDisplayName(v string) {
|
|
o.DisplayName = &v
|
|
}
|
|
|
|
// GetEndTime returns the EndTime field value if set, zero value otherwise.
|
|
func (o *Graph) GetEndTime() string {
|
|
if o == nil || IsNil(o.EndTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.EndTime
|
|
}
|
|
|
|
// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetEndTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.EndTime) {
|
|
return nil, false
|
|
}
|
|
return o.EndTime, true
|
|
}
|
|
|
|
// HasEndTime returns a boolean if a field has been set.
|
|
func (o *Graph) HasEndTime() bool {
|
|
if o != nil && !IsNil(o.EndTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEndTime gets a reference to the given string and assigns it to the EndTime field.
|
|
func (o *Graph) SetEndTime(v string) {
|
|
o.EndTime = &v
|
|
}
|
|
|
|
// GetErrorText returns the ErrorText field value if set, zero value otherwise.
|
|
func (o *Graph) GetErrorText() string {
|
|
if o == nil || IsNil(o.ErrorText) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ErrorText
|
|
}
|
|
|
|
// GetErrorTextOk returns a tuple with the ErrorText field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetErrorTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ErrorText) {
|
|
return nil, false
|
|
}
|
|
return o.ErrorText, true
|
|
}
|
|
|
|
// HasErrorText returns a boolean if a field has been set.
|
|
func (o *Graph) HasErrorText() bool {
|
|
if o != nil && !IsNil(o.ErrorText) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetErrorText gets a reference to the given string and assigns it to the ErrorText field.
|
|
func (o *Graph) SetErrorText(v string) {
|
|
o.ErrorText = &v
|
|
}
|
|
|
|
// GetLayout returns the Layout field value if set, zero value otherwise.
|
|
func (o *Graph) GetLayout() string {
|
|
if o == nil || IsNil(o.Layout) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Layout
|
|
}
|
|
|
|
// GetLayoutOk returns a tuple with the Layout field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetLayoutOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Layout) {
|
|
return nil, false
|
|
}
|
|
return o.Layout, true
|
|
}
|
|
|
|
// HasLayout returns a boolean if a field has been set.
|
|
func (o *Graph) HasLayout() bool {
|
|
if o != nil && !IsNil(o.Layout) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLayout gets a reference to the given string and assigns it to the Layout field.
|
|
func (o *Graph) SetLayout(v string) {
|
|
o.Layout = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *Graph) 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 *Graph) 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 *Graph) 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 *Graph) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *Graph) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *Graph) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *Graph) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
// GetStartTime returns the StartTime field value if set, zero value otherwise.
|
|
func (o *Graph) GetStartTime() string {
|
|
if o == nil || IsNil(o.StartTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.StartTime
|
|
}
|
|
|
|
// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetStartTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.StartTime) {
|
|
return nil, false
|
|
}
|
|
return o.StartTime, true
|
|
}
|
|
|
|
// HasStartTime returns a boolean if a field has been set.
|
|
func (o *Graph) HasStartTime() bool {
|
|
if o != nil && !IsNil(o.StartTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStartTime gets a reference to the given string and assigns it to the StartTime field.
|
|
func (o *Graph) SetStartTime(v string) {
|
|
o.StartTime = &v
|
|
}
|
|
|
|
// GetStore returns the Store field value if set, zero value otherwise.
|
|
func (o *Graph) GetStore() string {
|
|
if o == nil || IsNil(o.Store) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Store
|
|
}
|
|
|
|
// GetStoreOk returns a tuple with the Store field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetStoreOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Store) {
|
|
return nil, false
|
|
}
|
|
return o.Store, true
|
|
}
|
|
|
|
// HasStore returns a boolean if a field has been set.
|
|
func (o *Graph) HasStore() bool {
|
|
if o != nil && !IsNil(o.Store) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStore gets a reference to the given string and assigns it to the Store field.
|
|
func (o *Graph) SetStore(v string) {
|
|
o.Store = &v
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise.
|
|
func (o *Graph) GetText() string {
|
|
if o == nil || IsNil(o.Text) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Text
|
|
}
|
|
|
|
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Graph) GetTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Text) {
|
|
return nil, false
|
|
}
|
|
return o.Text, true
|
|
}
|
|
|
|
// HasText returns a boolean if a field has been set.
|
|
func (o *Graph) HasText() bool {
|
|
if o != nil && !IsNil(o.Text) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetText gets a reference to the given string and assigns it to the Text field.
|
|
func (o *Graph) SetText(v string) {
|
|
o.Text = &v
|
|
}
|
|
|
|
func (o Graph) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Graph) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Category) {
|
|
toSerialize["category"] = o.Category
|
|
}
|
|
if !IsNil(o.CreatedTime) {
|
|
toSerialize["createdTime"] = o.CreatedTime
|
|
}
|
|
if !IsNil(o.Density) {
|
|
toSerialize["density"] = o.Density
|
|
}
|
|
if !IsNil(o.DisplayName) {
|
|
toSerialize["displayName"] = o.DisplayName
|
|
}
|
|
if !IsNil(o.EndTime) {
|
|
toSerialize["endTime"] = o.EndTime
|
|
}
|
|
if !IsNil(o.ErrorText) {
|
|
toSerialize["errorText"] = o.ErrorText
|
|
}
|
|
if !IsNil(o.Layout) {
|
|
toSerialize["layout"] = o.Layout
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
if !IsNil(o.StartTime) {
|
|
toSerialize["startTime"] = o.StartTime
|
|
}
|
|
if !IsNil(o.Store) {
|
|
toSerialize["store"] = o.Store
|
|
}
|
|
if !IsNil(o.Text) {
|
|
toSerialize["text"] = o.Text
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *Graph) UnmarshalJSON(data []byte) (err error) {
|
|
varGraph := _Graph{}
|
|
|
|
err = json.Unmarshal(data, &varGraph)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = Graph(varGraph)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "category")
|
|
delete(additionalProperties, "createdTime")
|
|
delete(additionalProperties, "density")
|
|
delete(additionalProperties, "displayName")
|
|
delete(additionalProperties, "endTime")
|
|
delete(additionalProperties, "errorText")
|
|
delete(additionalProperties, "layout")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "owner")
|
|
delete(additionalProperties, "startTime")
|
|
delete(additionalProperties, "store")
|
|
delete(additionalProperties, "text")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraph struct {
|
|
value *Graph
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraph) Get() *Graph {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraph) Set(val *Graph) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraph) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraph) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraph(val *Graph) *NullableGraph {
|
|
return &NullableGraph{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraph) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraph) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|