Files
sdk/model_o11y_credentials.go

266 lines
7.1 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 O11yCredentials type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yCredentials{}
// O11yCredentials struct for O11yCredentials
type O11yCredentials struct {
IngestionKey *string `json:"ingestionKey,omitempty"`
IngestionUrl *string `json:"ingestionUrl,omitempty"`
// PAT
O11yApiKey *string `json:"o11yApiKey,omitempty"`
O11yApiUrl *string `json:"o11yApiUrl,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yCredentials O11yCredentials
// NewO11yCredentials instantiates a new O11yCredentials 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 NewO11yCredentials() *O11yCredentials {
this := O11yCredentials{}
return &this
}
// NewO11yCredentialsWithDefaults instantiates a new O11yCredentials 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 NewO11yCredentialsWithDefaults() *O11yCredentials {
this := O11yCredentials{}
return &this
}
// GetIngestionKey returns the IngestionKey field value if set, zero value otherwise.
func (o *O11yCredentials) GetIngestionKey() string {
if o == nil || IsNil(o.IngestionKey) {
var ret string
return ret
}
return *o.IngestionKey
}
// GetIngestionKeyOk returns a tuple with the IngestionKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yCredentials) GetIngestionKeyOk() (*string, bool) {
if o == nil || IsNil(o.IngestionKey) {
return nil, false
}
return o.IngestionKey, true
}
// HasIngestionKey returns a boolean if a field has been set.
func (o *O11yCredentials) HasIngestionKey() bool {
if o != nil && !IsNil(o.IngestionKey) {
return true
}
return false
}
// SetIngestionKey gets a reference to the given string and assigns it to the IngestionKey field.
func (o *O11yCredentials) SetIngestionKey(v string) {
o.IngestionKey = &v
}
// GetIngestionUrl returns the IngestionUrl field value if set, zero value otherwise.
func (o *O11yCredentials) GetIngestionUrl() string {
if o == nil || IsNil(o.IngestionUrl) {
var ret string
return ret
}
return *o.IngestionUrl
}
// GetIngestionUrlOk returns a tuple with the IngestionUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yCredentials) GetIngestionUrlOk() (*string, bool) {
if o == nil || IsNil(o.IngestionUrl) {
return nil, false
}
return o.IngestionUrl, true
}
// HasIngestionUrl returns a boolean if a field has been set.
func (o *O11yCredentials) HasIngestionUrl() bool {
if o != nil && !IsNil(o.IngestionUrl) {
return true
}
return false
}
// SetIngestionUrl gets a reference to the given string and assigns it to the IngestionUrl field.
func (o *O11yCredentials) SetIngestionUrl(v string) {
o.IngestionUrl = &v
}
// GetO11yApiKey returns the O11yApiKey field value if set, zero value otherwise.
func (o *O11yCredentials) GetO11yApiKey() string {
if o == nil || IsNil(o.O11yApiKey) {
var ret string
return ret
}
return *o.O11yApiKey
}
// GetO11yApiKeyOk returns a tuple with the O11yApiKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yCredentials) GetO11yApiKeyOk() (*string, bool) {
if o == nil || IsNil(o.O11yApiKey) {
return nil, false
}
return o.O11yApiKey, true
}
// HasO11yApiKey returns a boolean if a field has been set.
func (o *O11yCredentials) HasO11yApiKey() bool {
if o != nil && !IsNil(o.O11yApiKey) {
return true
}
return false
}
// SetO11yApiKey gets a reference to the given string and assigns it to the O11yApiKey field.
func (o *O11yCredentials) SetO11yApiKey(v string) {
o.O11yApiKey = &v
}
// GetO11yApiUrl returns the O11yApiUrl field value if set, zero value otherwise.
func (o *O11yCredentials) GetO11yApiUrl() string {
if o == nil || IsNil(o.O11yApiUrl) {
var ret string
return ret
}
return *o.O11yApiUrl
}
// GetO11yApiUrlOk returns a tuple with the O11yApiUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yCredentials) GetO11yApiUrlOk() (*string, bool) {
if o == nil || IsNil(o.O11yApiUrl) {
return nil, false
}
return o.O11yApiUrl, true
}
// HasO11yApiUrl returns a boolean if a field has been set.
func (o *O11yCredentials) HasO11yApiUrl() bool {
if o != nil && !IsNil(o.O11yApiUrl) {
return true
}
return false
}
// SetO11yApiUrl gets a reference to the given string and assigns it to the O11yApiUrl field.
func (o *O11yCredentials) SetO11yApiUrl(v string) {
o.O11yApiUrl = &v
}
func (o O11yCredentials) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yCredentials) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.IngestionKey) {
toSerialize["ingestionKey"] = o.IngestionKey
}
if !IsNil(o.IngestionUrl) {
toSerialize["ingestionUrl"] = o.IngestionUrl
}
if !IsNil(o.O11yApiKey) {
toSerialize["o11yApiKey"] = o.O11yApiKey
}
if !IsNil(o.O11yApiUrl) {
toSerialize["o11yApiUrl"] = o.O11yApiUrl
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yCredentials) UnmarshalJSON(data []byte) (err error) {
varO11yCredentials := _O11yCredentials{}
err = json.Unmarshal(data, &varO11yCredentials)
if err != nil {
return err
}
*o = O11yCredentials(varO11yCredentials)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "ingestionKey")
delete(additionalProperties, "ingestionUrl")
delete(additionalProperties, "o11yApiKey")
delete(additionalProperties, "o11yApiUrl")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yCredentials struct {
value *O11yCredentials
isSet bool
}
func (v NullableO11yCredentials) Get() *O11yCredentials {
return v.value
}
func (v *NullableO11yCredentials) Set(val *O11yCredentials) {
v.value = val
v.isSet = true
}
func (v NullableO11yCredentials) IsSet() bool {
return v.isSet
}
func (v *NullableO11yCredentials) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yCredentials(val *O11yCredentials) *NullableO11yCredentials {
return &NullableO11yCredentials{value: val, isSet: true}
}
func (v NullableO11yCredentials) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yCredentials) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}