Files
sdk/model_o11y_installed_integration.go

304 lines
8.4 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"
"time"
)
// checks if the O11yInstalledIntegration type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yInstalledIntegration{}
// O11yInstalledIntegration struct for O11yInstalledIntegration
type O11yInstalledIntegration struct {
Config map[string]interface{} `json:"config,omitempty"`
Id interface{} `json:"id,omitempty"`
InstalledAt *time.Time `json:"installed_at,omitempty"`
OrgId *string `json:"org_id,omitempty"`
Type *string `json:"type,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yInstalledIntegration O11yInstalledIntegration
// NewO11yInstalledIntegration instantiates a new O11yInstalledIntegration 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 NewO11yInstalledIntegration() *O11yInstalledIntegration {
this := O11yInstalledIntegration{}
return &this
}
// NewO11yInstalledIntegrationWithDefaults instantiates a new O11yInstalledIntegration 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 NewO11yInstalledIntegrationWithDefaults() *O11yInstalledIntegration {
this := O11yInstalledIntegration{}
return &this
}
// GetConfig returns the Config field value if set, zero value otherwise.
func (o *O11yInstalledIntegration) GetConfig() map[string]interface{} {
if o == nil || IsNil(o.Config) {
var ret map[string]interface{}
return ret
}
return o.Config
}
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yInstalledIntegration) GetConfigOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Config) {
return map[string]interface{}{}, false
}
return o.Config, true
}
// HasConfig returns a boolean if a field has been set.
func (o *O11yInstalledIntegration) HasConfig() bool {
if o != nil && !IsNil(o.Config) {
return true
}
return false
}
// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field.
func (o *O11yInstalledIntegration) SetConfig(v map[string]interface{}) {
o.Config = v
}
// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *O11yInstalledIntegration) GetId() interface{} {
if o == nil {
var ret interface{}
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.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *O11yInstalledIntegration) GetIdOk() (*interface{}, 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 *O11yInstalledIntegration) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given interface{} and assigns it to the Id field.
func (o *O11yInstalledIntegration) SetId(v interface{}) {
o.Id = v
}
// GetInstalledAt returns the InstalledAt field value if set, zero value otherwise.
func (o *O11yInstalledIntegration) GetInstalledAt() time.Time {
if o == nil || IsNil(o.InstalledAt) {
var ret time.Time
return ret
}
return *o.InstalledAt
}
// GetInstalledAtOk returns a tuple with the InstalledAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yInstalledIntegration) GetInstalledAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.InstalledAt) {
return nil, false
}
return o.InstalledAt, true
}
// HasInstalledAt returns a boolean if a field has been set.
func (o *O11yInstalledIntegration) HasInstalledAt() bool {
if o != nil && !IsNil(o.InstalledAt) {
return true
}
return false
}
// SetInstalledAt gets a reference to the given time.Time and assigns it to the InstalledAt field.
func (o *O11yInstalledIntegration) SetInstalledAt(v time.Time) {
o.InstalledAt = &v
}
// GetOrgId returns the OrgId field value if set, zero value otherwise.
func (o *O11yInstalledIntegration) GetOrgId() string {
if o == nil || IsNil(o.OrgId) {
var ret string
return ret
}
return *o.OrgId
}
// GetOrgIdOk returns a tuple with the OrgId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yInstalledIntegration) GetOrgIdOk() (*string, bool) {
if o == nil || IsNil(o.OrgId) {
return nil, false
}
return o.OrgId, true
}
// HasOrgId returns a boolean if a field has been set.
func (o *O11yInstalledIntegration) HasOrgId() bool {
if o != nil && !IsNil(o.OrgId) {
return true
}
return false
}
// SetOrgId gets a reference to the given string and assigns it to the OrgId field.
func (o *O11yInstalledIntegration) SetOrgId(v string) {
o.OrgId = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *O11yInstalledIntegration) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yInstalledIntegration) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *O11yInstalledIntegration) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *O11yInstalledIntegration) SetType(v string) {
o.Type = &v
}
func (o O11yInstalledIntegration) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yInstalledIntegration) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Config) {
toSerialize["config"] = o.Config
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if !IsNil(o.InstalledAt) {
toSerialize["installed_at"] = o.InstalledAt
}
if !IsNil(o.OrgId) {
toSerialize["org_id"] = o.OrgId
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yInstalledIntegration) UnmarshalJSON(data []byte) (err error) {
varO11yInstalledIntegration := _O11yInstalledIntegration{}
err = json.Unmarshal(data, &varO11yInstalledIntegration)
if err != nil {
return err
}
*o = O11yInstalledIntegration(varO11yInstalledIntegration)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "config")
delete(additionalProperties, "id")
delete(additionalProperties, "installed_at")
delete(additionalProperties, "org_id")
delete(additionalProperties, "type")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yInstalledIntegration struct {
value *O11yInstalledIntegration
isSet bool
}
func (v NullableO11yInstalledIntegration) Get() *O11yInstalledIntegration {
return v.value
}
func (v *NullableO11yInstalledIntegration) Set(val *O11yInstalledIntegration) {
v.value = val
v.isSet = true
}
func (v NullableO11yInstalledIntegration) IsSet() bool {
return v.isSet
}
func (v *NullableO11yInstalledIntegration) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yInstalledIntegration(val *O11yInstalledIntegration) *NullableO11yInstalledIntegration {
return &NullableO11yInstalledIntegration{value: val, isSet: true}
}
func (v NullableO11yInstalledIntegration) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yInstalledIntegration) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}