model_timeseries_specifier_logs.go•4.65 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 TimeseriesSpecifierLogs type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TimeseriesSpecifierLogs{}
// TimeseriesSpecifierLogs Configuration for a logs timeseries
type TimeseriesSpecifierLogs struct {
// Regular expressions to match logs
Regexes []string `json:"regexes,omitempty"`
// Regular expressions to exclude logs
ExcludeRegexes []string `json:"excludeRegexes,omitempty"`
}
// NewTimeseriesSpecifierLogs instantiates a new TimeseriesSpecifierLogs 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 NewTimeseriesSpecifierLogs() *TimeseriesSpecifierLogs {
this := TimeseriesSpecifierLogs{}
return &this
}
// NewTimeseriesSpecifierLogsWithDefaults instantiates a new TimeseriesSpecifierLogs 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 NewTimeseriesSpecifierLogsWithDefaults() *TimeseriesSpecifierLogs {
this := TimeseriesSpecifierLogs{}
return &this
}
// GetRegexes returns the Regexes field value if set, zero value otherwise.
func (o *TimeseriesSpecifierLogs) GetRegexes() []string {
if o == nil || IsNil(o.Regexes) {
var ret []string
return ret
}
return o.Regexes
}
// GetRegexesOk returns a tuple with the Regexes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TimeseriesSpecifierLogs) GetRegexesOk() ([]string, bool) {
if o == nil || IsNil(o.Regexes) {
return nil, false
}
return o.Regexes, true
}
// HasRegexes returns a boolean if a field has been set.
func (o *TimeseriesSpecifierLogs) HasRegexes() bool {
if o != nil && !IsNil(o.Regexes) {
return true
}
return false
}
// SetRegexes gets a reference to the given []string and assigns it to the Regexes field.
func (o *TimeseriesSpecifierLogs) SetRegexes(v []string) {
o.Regexes = v
}
// GetExcludeRegexes returns the ExcludeRegexes field value if set, zero value otherwise.
func (o *TimeseriesSpecifierLogs) GetExcludeRegexes() []string {
if o == nil || IsNil(o.ExcludeRegexes) {
var ret []string
return ret
}
return o.ExcludeRegexes
}
// GetExcludeRegexesOk returns a tuple with the ExcludeRegexes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TimeseriesSpecifierLogs) GetExcludeRegexesOk() ([]string, bool) {
if o == nil || IsNil(o.ExcludeRegexes) {
return nil, false
}
return o.ExcludeRegexes, true
}
// HasExcludeRegexes returns a boolean if a field has been set.
func (o *TimeseriesSpecifierLogs) HasExcludeRegexes() bool {
if o != nil && !IsNil(o.ExcludeRegexes) {
return true
}
return false
}
// SetExcludeRegexes gets a reference to the given []string and assigns it to the ExcludeRegexes field.
func (o *TimeseriesSpecifierLogs) SetExcludeRegexes(v []string) {
o.ExcludeRegexes = v
}
func (o TimeseriesSpecifierLogs) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TimeseriesSpecifierLogs) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Regexes) {
toSerialize["regexes"] = o.Regexes
}
if !IsNil(o.ExcludeRegexes) {
toSerialize["excludeRegexes"] = o.ExcludeRegexes
}
return toSerialize, nil
}
type NullableTimeseriesSpecifierLogs struct {
value *TimeseriesSpecifierLogs
isSet bool
}
func (v NullableTimeseriesSpecifierLogs) Get() *TimeseriesSpecifierLogs {
return v.value
}
func (v *NullableTimeseriesSpecifierLogs) Set(val *TimeseriesSpecifierLogs) {
v.value = val
v.isSet = true
}
func (v NullableTimeseriesSpecifierLogs) IsSet() bool {
return v.isSet
}
func (v *NullableTimeseriesSpecifierLogs) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTimeseriesSpecifierLogs(val *TimeseriesSpecifierLogs) *NullableTimeseriesSpecifierLogs {
return &NullableTimeseriesSpecifierLogs{value: val, isSet: true}
}
func (v NullableTimeseriesSpecifierLogs) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTimeseriesSpecifierLogs) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}