model_timeseries_specifier_kubernetes_resource.go•4.02 kB
/*
Metoro Alerts API
API for managing alerts in the Metoro observability platform.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package model
import (
"encoding/json"
)
// checks if the TimeseriesSpecifierKubernetesResource type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TimeseriesSpecifierKubernetesResource{}
// TimeseriesSpecifierKubernetesResource Configuration for a Kubernetes resource timeseries
type TimeseriesSpecifierKubernetesResource struct {
// JSONPath expression to extract data from Kubernetes resources
JsonPath *string `json:"jsonPath,omitempty"`
}
// NewTimeseriesSpecifierKubernetesResource instantiates a new TimeseriesSpecifierKubernetesResource 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 NewTimeseriesSpecifierKubernetesResource() *TimeseriesSpecifierKubernetesResource {
this := TimeseriesSpecifierKubernetesResource{}
return &this
}
// NewTimeseriesSpecifierKubernetesResourceWithDefaults instantiates a new TimeseriesSpecifierKubernetesResource 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 NewTimeseriesSpecifierKubernetesResourceWithDefaults() *TimeseriesSpecifierKubernetesResource {
this := TimeseriesSpecifierKubernetesResource{}
return &this
}
// GetJsonPath returns the JsonPath field value if set, zero value otherwise.
func (o *TimeseriesSpecifierKubernetesResource) GetJsonPath() string {
if o == nil || IsNil(o.JsonPath) {
var ret string
return ret
}
return *o.JsonPath
}
// GetJsonPathOk returns a tuple with the JsonPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TimeseriesSpecifierKubernetesResource) GetJsonPathOk() (*string, bool) {
if o == nil || IsNil(o.JsonPath) {
return nil, false
}
return o.JsonPath, true
}
// HasJsonPath returns a boolean if a field has been set.
func (o *TimeseriesSpecifierKubernetesResource) HasJsonPath() bool {
if o != nil && !IsNil(o.JsonPath) {
return true
}
return false
}
// SetJsonPath gets a reference to the given string and assigns it to the JsonPath field.
func (o *TimeseriesSpecifierKubernetesResource) SetJsonPath(v string) {
o.JsonPath = &v
}
func (o TimeseriesSpecifierKubernetesResource) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TimeseriesSpecifierKubernetesResource) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.JsonPath) {
toSerialize["jsonPath"] = o.JsonPath
}
return toSerialize, nil
}
type NullableTimeseriesSpecifierKubernetesResource struct {
value *TimeseriesSpecifierKubernetesResource
isSet bool
}
func (v NullableTimeseriesSpecifierKubernetesResource) Get() *TimeseriesSpecifierKubernetesResource {
return v.value
}
func (v *NullableTimeseriesSpecifierKubernetesResource) Set(val *TimeseriesSpecifierKubernetesResource) {
v.value = val
v.isSet = true
}
func (v NullableTimeseriesSpecifierKubernetesResource) IsSet() bool {
return v.isSet
}
func (v *NullableTimeseriesSpecifierKubernetesResource) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTimeseriesSpecifierKubernetesResource(val *TimeseriesSpecifierKubernetesResource) *NullableTimeseriesSpecifierKubernetesResource {
return &NullableTimeseriesSpecifierKubernetesResource{value: val, isSet: true}
}
func (v NullableTimeseriesSpecifierKubernetesResource) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTimeseriesSpecifierKubernetesResource) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}