Files
sdk/model_o11y_install_integration_request.go

191 lines
5.7 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 O11yInstallIntegrationRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yInstallIntegrationRequest{}
// O11yInstallIntegrationRequest struct for O11yInstallIntegrationRequest
type O11yInstallIntegrationRequest struct {
Config map[string]interface{} `json:"config,omitempty"`
IntegrationId *string `json:"integration_id,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yInstallIntegrationRequest O11yInstallIntegrationRequest
// NewO11yInstallIntegrationRequest instantiates a new O11yInstallIntegrationRequest 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 NewO11yInstallIntegrationRequest() *O11yInstallIntegrationRequest {
this := O11yInstallIntegrationRequest{}
return &this
}
// NewO11yInstallIntegrationRequestWithDefaults instantiates a new O11yInstallIntegrationRequest 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 NewO11yInstallIntegrationRequestWithDefaults() *O11yInstallIntegrationRequest {
this := O11yInstallIntegrationRequest{}
return &this
}
// GetConfig returns the Config field value if set, zero value otherwise.
func (o *O11yInstallIntegrationRequest) 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 *O11yInstallIntegrationRequest) 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 *O11yInstallIntegrationRequest) 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 *O11yInstallIntegrationRequest) SetConfig(v map[string]interface{}) {
o.Config = v
}
// GetIntegrationId returns the IntegrationId field value if set, zero value otherwise.
func (o *O11yInstallIntegrationRequest) GetIntegrationId() string {
if o == nil || IsNil(o.IntegrationId) {
var ret string
return ret
}
return *o.IntegrationId
}
// GetIntegrationIdOk returns a tuple with the IntegrationId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yInstallIntegrationRequest) GetIntegrationIdOk() (*string, bool) {
if o == nil || IsNil(o.IntegrationId) {
return nil, false
}
return o.IntegrationId, true
}
// HasIntegrationId returns a boolean if a field has been set.
func (o *O11yInstallIntegrationRequest) HasIntegrationId() bool {
if o != nil && !IsNil(o.IntegrationId) {
return true
}
return false
}
// SetIntegrationId gets a reference to the given string and assigns it to the IntegrationId field.
func (o *O11yInstallIntegrationRequest) SetIntegrationId(v string) {
o.IntegrationId = &v
}
func (o O11yInstallIntegrationRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yInstallIntegrationRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Config) {
toSerialize["config"] = o.Config
}
if !IsNil(o.IntegrationId) {
toSerialize["integration_id"] = o.IntegrationId
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yInstallIntegrationRequest) UnmarshalJSON(data []byte) (err error) {
varO11yInstallIntegrationRequest := _O11yInstallIntegrationRequest{}
err = json.Unmarshal(data, &varO11yInstallIntegrationRequest)
if err != nil {
return err
}
*o = O11yInstallIntegrationRequest(varO11yInstallIntegrationRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "config")
delete(additionalProperties, "integration_id")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yInstallIntegrationRequest struct {
value *O11yInstallIntegrationRequest
isSet bool
}
func (v NullableO11yInstallIntegrationRequest) Get() *O11yInstallIntegrationRequest {
return v.value
}
func (v *NullableO11yInstallIntegrationRequest) Set(val *O11yInstallIntegrationRequest) {
v.value = val
v.isSet = true
}
func (v NullableO11yInstallIntegrationRequest) IsSet() bool {
return v.isSet
}
func (v *NullableO11yInstallIntegrationRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yInstallIntegrationRequest(val *O11yInstallIntegrationRequest) *NullableO11yInstallIntegrationRequest {
return &NullableO11yInstallIntegrationRequest{value: val, isSet: true}
}
func (v NullableO11yInstallIntegrationRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yInstallIntegrationRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}