Files
sdk/model_o11y_integration.go

563 lines
16 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 O11yIntegration type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yIntegration{}
// O11yIntegration struct for O11yIntegration
type O11yIntegration struct {
Assets *O11yIntegrationAssets `json:"assets,omitempty"`
Author *O11yIntegrationAuthor `json:"author,omitempty"`
Categories []string `json:"categories,omitempty"`
Configuration []O11yIntegrationConfigStep `json:"configuration,omitempty"`
ConnectionTests *O11yIntegrationConnectionTests `json:"connection_tests,omitempty"`
DataCollected *O11yDataCollectedForIntegration `json:"data_collected,omitempty"`
// A short description
Description *string `json:"description,omitempty"`
Icon *string `json:"icon,omitempty"`
Id *string `json:"id,omitempty"`
Installation *O11yInstalledIntegration `json:"installation,omitempty"`
// markdown
Overview *string `json:"overview,omitempty"`
Title *string `json:"title,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yIntegration O11yIntegration
// NewO11yIntegration instantiates a new O11yIntegration 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 NewO11yIntegration() *O11yIntegration {
this := O11yIntegration{}
return &this
}
// NewO11yIntegrationWithDefaults instantiates a new O11yIntegration 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 NewO11yIntegrationWithDefaults() *O11yIntegration {
this := O11yIntegration{}
return &this
}
// GetAssets returns the Assets field value if set, zero value otherwise.
func (o *O11yIntegration) GetAssets() O11yIntegrationAssets {
if o == nil || IsNil(o.Assets) {
var ret O11yIntegrationAssets
return ret
}
return *o.Assets
}
// GetAssetsOk returns a tuple with the Assets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetAssetsOk() (*O11yIntegrationAssets, bool) {
if o == nil || IsNil(o.Assets) {
return nil, false
}
return o.Assets, true
}
// HasAssets returns a boolean if a field has been set.
func (o *O11yIntegration) HasAssets() bool {
if o != nil && !IsNil(o.Assets) {
return true
}
return false
}
// SetAssets gets a reference to the given O11yIntegrationAssets and assigns it to the Assets field.
func (o *O11yIntegration) SetAssets(v O11yIntegrationAssets) {
o.Assets = &v
}
// GetAuthor returns the Author field value if set, zero value otherwise.
func (o *O11yIntegration) GetAuthor() O11yIntegrationAuthor {
if o == nil || IsNil(o.Author) {
var ret O11yIntegrationAuthor
return ret
}
return *o.Author
}
// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetAuthorOk() (*O11yIntegrationAuthor, bool) {
if o == nil || IsNil(o.Author) {
return nil, false
}
return o.Author, true
}
// HasAuthor returns a boolean if a field has been set.
func (o *O11yIntegration) HasAuthor() bool {
if o != nil && !IsNil(o.Author) {
return true
}
return false
}
// SetAuthor gets a reference to the given O11yIntegrationAuthor and assigns it to the Author field.
func (o *O11yIntegration) SetAuthor(v O11yIntegrationAuthor) {
o.Author = &v
}
// GetCategories returns the Categories field value if set, zero value otherwise.
func (o *O11yIntegration) GetCategories() []string {
if o == nil || IsNil(o.Categories) {
var ret []string
return ret
}
return o.Categories
}
// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetCategoriesOk() ([]string, bool) {
if o == nil || IsNil(o.Categories) {
return nil, false
}
return o.Categories, true
}
// HasCategories returns a boolean if a field has been set.
func (o *O11yIntegration) HasCategories() bool {
if o != nil && !IsNil(o.Categories) {
return true
}
return false
}
// SetCategories gets a reference to the given []string and assigns it to the Categories field.
func (o *O11yIntegration) SetCategories(v []string) {
o.Categories = v
}
// GetConfiguration returns the Configuration field value if set, zero value otherwise.
func (o *O11yIntegration) GetConfiguration() []O11yIntegrationConfigStep {
if o == nil || IsNil(o.Configuration) {
var ret []O11yIntegrationConfigStep
return ret
}
return o.Configuration
}
// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetConfigurationOk() ([]O11yIntegrationConfigStep, bool) {
if o == nil || IsNil(o.Configuration) {
return nil, false
}
return o.Configuration, true
}
// HasConfiguration returns a boolean if a field has been set.
func (o *O11yIntegration) HasConfiguration() bool {
if o != nil && !IsNil(o.Configuration) {
return true
}
return false
}
// SetConfiguration gets a reference to the given []O11yIntegrationConfigStep and assigns it to the Configuration field.
func (o *O11yIntegration) SetConfiguration(v []O11yIntegrationConfigStep) {
o.Configuration = v
}
// GetConnectionTests returns the ConnectionTests field value if set, zero value otherwise.
func (o *O11yIntegration) GetConnectionTests() O11yIntegrationConnectionTests {
if o == nil || IsNil(o.ConnectionTests) {
var ret O11yIntegrationConnectionTests
return ret
}
return *o.ConnectionTests
}
// GetConnectionTestsOk returns a tuple with the ConnectionTests field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetConnectionTestsOk() (*O11yIntegrationConnectionTests, bool) {
if o == nil || IsNil(o.ConnectionTests) {
return nil, false
}
return o.ConnectionTests, true
}
// HasConnectionTests returns a boolean if a field has been set.
func (o *O11yIntegration) HasConnectionTests() bool {
if o != nil && !IsNil(o.ConnectionTests) {
return true
}
return false
}
// SetConnectionTests gets a reference to the given O11yIntegrationConnectionTests and assigns it to the ConnectionTests field.
func (o *O11yIntegration) SetConnectionTests(v O11yIntegrationConnectionTests) {
o.ConnectionTests = &v
}
// GetDataCollected returns the DataCollected field value if set, zero value otherwise.
func (o *O11yIntegration) GetDataCollected() O11yDataCollectedForIntegration {
if o == nil || IsNil(o.DataCollected) {
var ret O11yDataCollectedForIntegration
return ret
}
return *o.DataCollected
}
// GetDataCollectedOk returns a tuple with the DataCollected field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetDataCollectedOk() (*O11yDataCollectedForIntegration, bool) {
if o == nil || IsNil(o.DataCollected) {
return nil, false
}
return o.DataCollected, true
}
// HasDataCollected returns a boolean if a field has been set.
func (o *O11yIntegration) HasDataCollected() bool {
if o != nil && !IsNil(o.DataCollected) {
return true
}
return false
}
// SetDataCollected gets a reference to the given O11yDataCollectedForIntegration and assigns it to the DataCollected field.
func (o *O11yIntegration) SetDataCollected(v O11yDataCollectedForIntegration) {
o.DataCollected = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *O11yIntegration) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *O11yIntegration) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *O11yIntegration) SetDescription(v string) {
o.Description = &v
}
// GetIcon returns the Icon field value if set, zero value otherwise.
func (o *O11yIntegration) GetIcon() string {
if o == nil || IsNil(o.Icon) {
var ret string
return ret
}
return *o.Icon
}
// GetIconOk returns a tuple with the Icon field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetIconOk() (*string, bool) {
if o == nil || IsNil(o.Icon) {
return nil, false
}
return o.Icon, true
}
// HasIcon returns a boolean if a field has been set.
func (o *O11yIntegration) HasIcon() bool {
if o != nil && !IsNil(o.Icon) {
return true
}
return false
}
// SetIcon gets a reference to the given string and assigns it to the Icon field.
func (o *O11yIntegration) SetIcon(v string) {
o.Icon = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *O11yIntegration) 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 *O11yIntegration) 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 *O11yIntegration) 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 *O11yIntegration) SetId(v string) {
o.Id = &v
}
// GetInstallation returns the Installation field value if set, zero value otherwise.
func (o *O11yIntegration) GetInstallation() O11yInstalledIntegration {
if o == nil || IsNil(o.Installation) {
var ret O11yInstalledIntegration
return ret
}
return *o.Installation
}
// GetInstallationOk returns a tuple with the Installation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetInstallationOk() (*O11yInstalledIntegration, bool) {
if o == nil || IsNil(o.Installation) {
return nil, false
}
return o.Installation, true
}
// HasInstallation returns a boolean if a field has been set.
func (o *O11yIntegration) HasInstallation() bool {
if o != nil && !IsNil(o.Installation) {
return true
}
return false
}
// SetInstallation gets a reference to the given O11yInstalledIntegration and assigns it to the Installation field.
func (o *O11yIntegration) SetInstallation(v O11yInstalledIntegration) {
o.Installation = &v
}
// GetOverview returns the Overview field value if set, zero value otherwise.
func (o *O11yIntegration) GetOverview() string {
if o == nil || IsNil(o.Overview) {
var ret string
return ret
}
return *o.Overview
}
// GetOverviewOk returns a tuple with the Overview field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yIntegration) GetOverviewOk() (*string, bool) {
if o == nil || IsNil(o.Overview) {
return nil, false
}
return o.Overview, true
}
// HasOverview returns a boolean if a field has been set.
func (o *O11yIntegration) HasOverview() bool {
if o != nil && !IsNil(o.Overview) {
return true
}
return false
}
// SetOverview gets a reference to the given string and assigns it to the Overview field.
func (o *O11yIntegration) SetOverview(v string) {
o.Overview = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *O11yIntegration) 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 *O11yIntegration) 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 *O11yIntegration) 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 *O11yIntegration) SetTitle(v string) {
o.Title = &v
}
func (o O11yIntegration) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yIntegration) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Assets) {
toSerialize["assets"] = o.Assets
}
if !IsNil(o.Author) {
toSerialize["author"] = o.Author
}
if !IsNil(o.Categories) {
toSerialize["categories"] = o.Categories
}
if !IsNil(o.Configuration) {
toSerialize["configuration"] = o.Configuration
}
if !IsNil(o.ConnectionTests) {
toSerialize["connection_tests"] = o.ConnectionTests
}
if !IsNil(o.DataCollected) {
toSerialize["data_collected"] = o.DataCollected
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Icon) {
toSerialize["icon"] = o.Icon
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Installation) {
toSerialize["installation"] = o.Installation
}
if !IsNil(o.Overview) {
toSerialize["overview"] = o.Overview
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yIntegration) UnmarshalJSON(data []byte) (err error) {
varO11yIntegration := _O11yIntegration{}
err = json.Unmarshal(data, &varO11yIntegration)
if err != nil {
return err
}
*o = O11yIntegration(varO11yIntegration)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "assets")
delete(additionalProperties, "author")
delete(additionalProperties, "categories")
delete(additionalProperties, "configuration")
delete(additionalProperties, "connection_tests")
delete(additionalProperties, "data_collected")
delete(additionalProperties, "description")
delete(additionalProperties, "icon")
delete(additionalProperties, "id")
delete(additionalProperties, "installation")
delete(additionalProperties, "overview")
delete(additionalProperties, "title")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yIntegration struct {
value *O11yIntegration
isSet bool
}
func (v NullableO11yIntegration) Get() *O11yIntegration {
return v.value
}
func (v *NullableO11yIntegration) Set(val *O11yIntegration) {
v.value = val
v.isSet = true
}
func (v NullableO11yIntegration) IsSet() bool {
return v.isSet
}
func (v *NullableO11yIntegration) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yIntegration(val *O11yIntegration) *NullableO11yIntegration {
return &NullableO11yIntegration{value: val, isSet: true}
}
func (v NullableO11yIntegration) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yIntegration) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}