755 lines
24 KiB
Go
755 lines
24 KiB
Go
/*
|
|
STACKIT Logs API
|
|
|
|
This API provides endpoints for managing STACKIT Logs.
|
|
|
|
API version: 1beta.0.3
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package logsbeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
// checks if the LogsInstance type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &LogsInstance{}
|
|
|
|
/*
|
|
types and functions for acl
|
|
*/
|
|
|
|
// isArray
|
|
type LogsInstanceGetAclAttributeType = *[]string
|
|
type LogsInstanceGetAclArgType = []string
|
|
type LogsInstanceGetAclRetType = []string
|
|
|
|
func getLogsInstanceGetAclAttributeTypeOk(arg LogsInstanceGetAclAttributeType) (ret LogsInstanceGetAclRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetAclAttributeType(arg *LogsInstanceGetAclAttributeType, val LogsInstanceGetAclRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for created
|
|
*/
|
|
|
|
// isDateTime
|
|
type LogsInstanceGetCreatedAttributeType = *time.Time
|
|
type LogsInstanceGetCreatedArgType = time.Time
|
|
type LogsInstanceGetCreatedRetType = time.Time
|
|
|
|
func getLogsInstanceGetCreatedAttributeTypeOk(arg LogsInstanceGetCreatedAttributeType) (ret LogsInstanceGetCreatedRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetCreatedAttributeType(arg *LogsInstanceGetCreatedAttributeType, val LogsInstanceGetCreatedRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for datasourceUrl
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LogsInstanceGetDatasourceUrlAttributeType = *string
|
|
|
|
func getLogsInstanceGetDatasourceUrlAttributeTypeOk(arg LogsInstanceGetDatasourceUrlAttributeType) (ret LogsInstanceGetDatasourceUrlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetDatasourceUrlAttributeType(arg *LogsInstanceGetDatasourceUrlAttributeType, val LogsInstanceGetDatasourceUrlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LogsInstanceGetDatasourceUrlArgType = string
|
|
type LogsInstanceGetDatasourceUrlRetType = string
|
|
|
|
/*
|
|
types and functions for description
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LogsInstanceGetDescriptionAttributeType = *string
|
|
|
|
func getLogsInstanceGetDescriptionAttributeTypeOk(arg LogsInstanceGetDescriptionAttributeType) (ret LogsInstanceGetDescriptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetDescriptionAttributeType(arg *LogsInstanceGetDescriptionAttributeType, val LogsInstanceGetDescriptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LogsInstanceGetDescriptionArgType = string
|
|
type LogsInstanceGetDescriptionRetType = string
|
|
|
|
/*
|
|
types and functions for displayName
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LogsInstanceGetDisplayNameAttributeType = *string
|
|
|
|
func getLogsInstanceGetDisplayNameAttributeTypeOk(arg LogsInstanceGetDisplayNameAttributeType) (ret LogsInstanceGetDisplayNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetDisplayNameAttributeType(arg *LogsInstanceGetDisplayNameAttributeType, val LogsInstanceGetDisplayNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LogsInstanceGetDisplayNameArgType = string
|
|
type LogsInstanceGetDisplayNameRetType = string
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LogsInstanceGetIdAttributeType = *string
|
|
|
|
func getLogsInstanceGetIdAttributeTypeOk(arg LogsInstanceGetIdAttributeType) (ret LogsInstanceGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetIdAttributeType(arg *LogsInstanceGetIdAttributeType, val LogsInstanceGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LogsInstanceGetIdArgType = string
|
|
type LogsInstanceGetIdRetType = string
|
|
|
|
/*
|
|
types and functions for ingestOtlpUrl
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LogsInstanceGetIngestOtlpUrlAttributeType = *string
|
|
|
|
func getLogsInstanceGetIngestOtlpUrlAttributeTypeOk(arg LogsInstanceGetIngestOtlpUrlAttributeType) (ret LogsInstanceGetIngestOtlpUrlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetIngestOtlpUrlAttributeType(arg *LogsInstanceGetIngestOtlpUrlAttributeType, val LogsInstanceGetIngestOtlpUrlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LogsInstanceGetIngestOtlpUrlArgType = string
|
|
type LogsInstanceGetIngestOtlpUrlRetType = string
|
|
|
|
/*
|
|
types and functions for ingestUrl
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LogsInstanceGetIngestUrlAttributeType = *string
|
|
|
|
func getLogsInstanceGetIngestUrlAttributeTypeOk(arg LogsInstanceGetIngestUrlAttributeType) (ret LogsInstanceGetIngestUrlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetIngestUrlAttributeType(arg *LogsInstanceGetIngestUrlAttributeType, val LogsInstanceGetIngestUrlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LogsInstanceGetIngestUrlArgType = string
|
|
type LogsInstanceGetIngestUrlRetType = string
|
|
|
|
/*
|
|
types and functions for queryRangeUrl
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LogsInstanceGetQueryRangeUrlAttributeType = *string
|
|
|
|
func getLogsInstanceGetQueryRangeUrlAttributeTypeOk(arg LogsInstanceGetQueryRangeUrlAttributeType) (ret LogsInstanceGetQueryRangeUrlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetQueryRangeUrlAttributeType(arg *LogsInstanceGetQueryRangeUrlAttributeType, val LogsInstanceGetQueryRangeUrlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LogsInstanceGetQueryRangeUrlArgType = string
|
|
type LogsInstanceGetQueryRangeUrlRetType = string
|
|
|
|
/*
|
|
types and functions for queryUrl
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LogsInstanceGetQueryUrlAttributeType = *string
|
|
|
|
func getLogsInstanceGetQueryUrlAttributeTypeOk(arg LogsInstanceGetQueryUrlAttributeType) (ret LogsInstanceGetQueryUrlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetQueryUrlAttributeType(arg *LogsInstanceGetQueryUrlAttributeType, val LogsInstanceGetQueryUrlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LogsInstanceGetQueryUrlArgType = string
|
|
type LogsInstanceGetQueryUrlRetType = string
|
|
|
|
/*
|
|
types and functions for retentionDays
|
|
*/
|
|
|
|
// isInteger
|
|
type LogsInstanceGetRetentionDaysAttributeType = *int64
|
|
type LogsInstanceGetRetentionDaysArgType = int64
|
|
type LogsInstanceGetRetentionDaysRetType = int64
|
|
|
|
func getLogsInstanceGetRetentionDaysAttributeTypeOk(arg LogsInstanceGetRetentionDaysAttributeType) (ret LogsInstanceGetRetentionDaysRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetRetentionDaysAttributeType(arg *LogsInstanceGetRetentionDaysAttributeType, val LogsInstanceGetRetentionDaysRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for status
|
|
*/
|
|
|
|
// isEnum
|
|
|
|
// LogsInstanceStatus The current status of the Logs instance.
|
|
// value type for enums
|
|
type LogsInstanceStatus string
|
|
|
|
// List of Status
|
|
const (
|
|
LOGSINSTANCESTATUS_ACTIVE LogsInstanceStatus = "active"
|
|
LOGSINSTANCESTATUS_DELETING LogsInstanceStatus = "deleting"
|
|
LOGSINSTANCESTATUS_RECONCILING LogsInstanceStatus = "reconciling"
|
|
)
|
|
|
|
// All allowed values of LogsInstance enum
|
|
var AllowedLogsInstanceStatusEnumValues = []LogsInstanceStatus{
|
|
"active",
|
|
"deleting",
|
|
"reconciling",
|
|
}
|
|
|
|
func (v *LogsInstanceStatus) UnmarshalJSON(src []byte) error {
|
|
// use a type alias to prevent infinite recursion during unmarshal,
|
|
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
|
|
type TmpJson LogsInstanceStatus
|
|
var value TmpJson
|
|
err := json.Unmarshal(src, &value)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
// Allow unmarshalling zero value for testing purposes
|
|
var zeroValue TmpJson
|
|
if value == zeroValue {
|
|
return nil
|
|
}
|
|
enumTypeValue := LogsInstanceStatus(value)
|
|
for _, existing := range AllowedLogsInstanceStatusEnumValues {
|
|
if existing == enumTypeValue {
|
|
*v = enumTypeValue
|
|
return nil
|
|
}
|
|
}
|
|
|
|
return fmt.Errorf("%+v is not a valid LogsInstance", value)
|
|
}
|
|
|
|
// NewLogsInstanceStatusFromValue returns a pointer to a valid LogsInstanceStatus
|
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
|
func NewLogsInstanceStatusFromValue(v LogsInstanceStatus) (*LogsInstanceStatus, error) {
|
|
ev := LogsInstanceStatus(v)
|
|
if ev.IsValid() {
|
|
return &ev, nil
|
|
} else {
|
|
return nil, fmt.Errorf("invalid value '%v' for LogsInstanceStatus: valid values are %v", v, AllowedLogsInstanceStatusEnumValues)
|
|
}
|
|
}
|
|
|
|
// IsValid return true if the value is valid for the enum, false otherwise
|
|
func (v LogsInstanceStatus) IsValid() bool {
|
|
for _, existing := range AllowedLogsInstanceStatusEnumValues {
|
|
if existing == v {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
// Ptr returns reference to StatusStatus value
|
|
func (v LogsInstanceStatus) Ptr() *LogsInstanceStatus {
|
|
return &v
|
|
}
|
|
|
|
type NullableLogsInstanceStatus struct {
|
|
value *LogsInstanceStatus
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableLogsInstanceStatus) Get() *LogsInstanceStatus {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableLogsInstanceStatus) Set(val *LogsInstanceStatus) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableLogsInstanceStatus) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableLogsInstanceStatus) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableLogsInstanceStatus(val *LogsInstanceStatus) *NullableLogsInstanceStatus {
|
|
return &NullableLogsInstanceStatus{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableLogsInstanceStatus) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableLogsInstanceStatus) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
type LogsInstanceGetStatusAttributeType = *LogsInstanceStatus
|
|
type LogsInstanceGetStatusArgType = LogsInstanceStatus
|
|
type LogsInstanceGetStatusRetType = LogsInstanceStatus
|
|
|
|
func getLogsInstanceGetStatusAttributeTypeOk(arg LogsInstanceGetStatusAttributeType) (ret LogsInstanceGetStatusRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLogsInstanceGetStatusAttributeType(arg *LogsInstanceGetStatusAttributeType, val LogsInstanceGetStatusRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// LogsInstance struct for LogsInstance
|
|
type LogsInstance struct {
|
|
// The access control list for the Logs instance.
|
|
Acl LogsInstanceGetAclAttributeType `json:"acl,omitempty"`
|
|
// The date and time the creation of the Logs instance was triggered.
|
|
// REQUIRED
|
|
Created LogsInstanceGetCreatedAttributeType `json:"created" required:"true"`
|
|
// The Logs instance's datasource URL, can be used in Grafana as a datasource URL
|
|
DatasourceUrl LogsInstanceGetDatasourceUrlAttributeType `json:"datasourceUrl,omitempty"`
|
|
// The description of the Logs instance.
|
|
Description LogsInstanceGetDescriptionAttributeType `json:"description,omitempty"`
|
|
// The displayed name of the Logs instance.
|
|
// REQUIRED
|
|
DisplayName LogsInstanceGetDisplayNameAttributeType `json:"displayName" required:"true"`
|
|
// A auto generated unique id which identifies the Logs instance.
|
|
// REQUIRED
|
|
Id LogsInstanceGetIdAttributeType `json:"id" required:"true"`
|
|
// The Logs instance's ingest logs via OTLP URL
|
|
IngestOtlpUrl LogsInstanceGetIngestOtlpUrlAttributeType `json:"ingestOtlpUrl,omitempty"`
|
|
// The Logs instance's ingest logs URL
|
|
IngestUrl LogsInstanceGetIngestUrlAttributeType `json:"ingestUrl,omitempty"`
|
|
// The Logs instance's query range URL
|
|
QueryRangeUrl LogsInstanceGetQueryRangeUrlAttributeType `json:"queryRangeUrl,omitempty"`
|
|
// The Logs instance's query URL
|
|
QueryUrl LogsInstanceGetQueryUrlAttributeType `json:"queryUrl,omitempty"`
|
|
// The log retention time in days.
|
|
// Can be cast to int32 without loss of precision.
|
|
// REQUIRED
|
|
RetentionDays LogsInstanceGetRetentionDaysAttributeType `json:"retentionDays" required:"true"`
|
|
// The current status of the Logs instance.
|
|
// REQUIRED
|
|
Status LogsInstanceGetStatusAttributeType `json:"status" required:"true"`
|
|
}
|
|
|
|
type _LogsInstance LogsInstance
|
|
|
|
// NewLogsInstance instantiates a new LogsInstance 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 NewLogsInstance(created LogsInstanceGetCreatedArgType, displayName LogsInstanceGetDisplayNameArgType, id LogsInstanceGetIdArgType, retentionDays LogsInstanceGetRetentionDaysArgType, status LogsInstanceGetStatusArgType) *LogsInstance {
|
|
this := LogsInstance{}
|
|
setLogsInstanceGetCreatedAttributeType(&this.Created, created)
|
|
setLogsInstanceGetDisplayNameAttributeType(&this.DisplayName, displayName)
|
|
setLogsInstanceGetIdAttributeType(&this.Id, id)
|
|
setLogsInstanceGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays)
|
|
setLogsInstanceGetStatusAttributeType(&this.Status, status)
|
|
return &this
|
|
}
|
|
|
|
// NewLogsInstanceWithDefaults instantiates a new LogsInstance 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 NewLogsInstanceWithDefaults() *LogsInstance {
|
|
this := LogsInstance{}
|
|
return &this
|
|
}
|
|
|
|
// GetAcl returns the Acl field value if set, zero value otherwise.
|
|
func (o *LogsInstance) GetAcl() (res LogsInstanceGetAclRetType) {
|
|
res, _ = o.GetAclOk()
|
|
return
|
|
}
|
|
|
|
// GetAclOk returns a tuple with the Acl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetAclOk() (ret LogsInstanceGetAclRetType, ok bool) {
|
|
return getLogsInstanceGetAclAttributeTypeOk(o.Acl)
|
|
}
|
|
|
|
// HasAcl returns a boolean if a field has been set.
|
|
func (o *LogsInstance) HasAcl() bool {
|
|
_, ok := o.GetAclOk()
|
|
return ok
|
|
}
|
|
|
|
// SetAcl gets a reference to the given []string and assigns it to the Acl field.
|
|
func (o *LogsInstance) SetAcl(v LogsInstanceGetAclRetType) {
|
|
setLogsInstanceGetAclAttributeType(&o.Acl, v)
|
|
}
|
|
|
|
// GetCreated returns the Created field value
|
|
func (o *LogsInstance) GetCreated() (ret LogsInstanceGetCreatedRetType) {
|
|
ret, _ = o.GetCreatedOk()
|
|
return ret
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetCreatedOk() (ret LogsInstanceGetCreatedRetType, ok bool) {
|
|
return getLogsInstanceGetCreatedAttributeTypeOk(o.Created)
|
|
}
|
|
|
|
// SetCreated sets field value
|
|
func (o *LogsInstance) SetCreated(v LogsInstanceGetCreatedRetType) {
|
|
setLogsInstanceGetCreatedAttributeType(&o.Created, v)
|
|
}
|
|
|
|
// GetDatasourceUrl returns the DatasourceUrl field value if set, zero value otherwise.
|
|
func (o *LogsInstance) GetDatasourceUrl() (res LogsInstanceGetDatasourceUrlRetType) {
|
|
res, _ = o.GetDatasourceUrlOk()
|
|
return
|
|
}
|
|
|
|
// GetDatasourceUrlOk returns a tuple with the DatasourceUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetDatasourceUrlOk() (ret LogsInstanceGetDatasourceUrlRetType, ok bool) {
|
|
return getLogsInstanceGetDatasourceUrlAttributeTypeOk(o.DatasourceUrl)
|
|
}
|
|
|
|
// HasDatasourceUrl returns a boolean if a field has been set.
|
|
func (o *LogsInstance) HasDatasourceUrl() bool {
|
|
_, ok := o.GetDatasourceUrlOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDatasourceUrl gets a reference to the given string and assigns it to the DatasourceUrl field.
|
|
func (o *LogsInstance) SetDatasourceUrl(v LogsInstanceGetDatasourceUrlRetType) {
|
|
setLogsInstanceGetDatasourceUrlAttributeType(&o.DatasourceUrl, v)
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *LogsInstance) GetDescription() (res LogsInstanceGetDescriptionRetType) {
|
|
res, _ = o.GetDescriptionOk()
|
|
return
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetDescriptionOk() (ret LogsInstanceGetDescriptionRetType, ok bool) {
|
|
return getLogsInstanceGetDescriptionAttributeTypeOk(o.Description)
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *LogsInstance) HasDescription() bool {
|
|
_, ok := o.GetDescriptionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *LogsInstance) SetDescription(v LogsInstanceGetDescriptionRetType) {
|
|
setLogsInstanceGetDescriptionAttributeType(&o.Description, v)
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value
|
|
func (o *LogsInstance) GetDisplayName() (ret LogsInstanceGetDisplayNameRetType) {
|
|
ret, _ = o.GetDisplayNameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetDisplayNameOk returns a tuple with the DisplayName field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetDisplayNameOk() (ret LogsInstanceGetDisplayNameRetType, ok bool) {
|
|
return getLogsInstanceGetDisplayNameAttributeTypeOk(o.DisplayName)
|
|
}
|
|
|
|
// SetDisplayName sets field value
|
|
func (o *LogsInstance) SetDisplayName(v LogsInstanceGetDisplayNameRetType) {
|
|
setLogsInstanceGetDisplayNameAttributeType(&o.DisplayName, v)
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *LogsInstance) GetId() (ret LogsInstanceGetIdRetType) {
|
|
ret, _ = o.GetIdOk()
|
|
return ret
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetIdOk() (ret LogsInstanceGetIdRetType, ok bool) {
|
|
return getLogsInstanceGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *LogsInstance) SetId(v LogsInstanceGetIdRetType) {
|
|
setLogsInstanceGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetIngestOtlpUrl returns the IngestOtlpUrl field value if set, zero value otherwise.
|
|
func (o *LogsInstance) GetIngestOtlpUrl() (res LogsInstanceGetIngestOtlpUrlRetType) {
|
|
res, _ = o.GetIngestOtlpUrlOk()
|
|
return
|
|
}
|
|
|
|
// GetIngestOtlpUrlOk returns a tuple with the IngestOtlpUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetIngestOtlpUrlOk() (ret LogsInstanceGetIngestOtlpUrlRetType, ok bool) {
|
|
return getLogsInstanceGetIngestOtlpUrlAttributeTypeOk(o.IngestOtlpUrl)
|
|
}
|
|
|
|
// HasIngestOtlpUrl returns a boolean if a field has been set.
|
|
func (o *LogsInstance) HasIngestOtlpUrl() bool {
|
|
_, ok := o.GetIngestOtlpUrlOk()
|
|
return ok
|
|
}
|
|
|
|
// SetIngestOtlpUrl gets a reference to the given string and assigns it to the IngestOtlpUrl field.
|
|
func (o *LogsInstance) SetIngestOtlpUrl(v LogsInstanceGetIngestOtlpUrlRetType) {
|
|
setLogsInstanceGetIngestOtlpUrlAttributeType(&o.IngestOtlpUrl, v)
|
|
}
|
|
|
|
// GetIngestUrl returns the IngestUrl field value if set, zero value otherwise.
|
|
func (o *LogsInstance) GetIngestUrl() (res LogsInstanceGetIngestUrlRetType) {
|
|
res, _ = o.GetIngestUrlOk()
|
|
return
|
|
}
|
|
|
|
// GetIngestUrlOk returns a tuple with the IngestUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetIngestUrlOk() (ret LogsInstanceGetIngestUrlRetType, ok bool) {
|
|
return getLogsInstanceGetIngestUrlAttributeTypeOk(o.IngestUrl)
|
|
}
|
|
|
|
// HasIngestUrl returns a boolean if a field has been set.
|
|
func (o *LogsInstance) HasIngestUrl() bool {
|
|
_, ok := o.GetIngestUrlOk()
|
|
return ok
|
|
}
|
|
|
|
// SetIngestUrl gets a reference to the given string and assigns it to the IngestUrl field.
|
|
func (o *LogsInstance) SetIngestUrl(v LogsInstanceGetIngestUrlRetType) {
|
|
setLogsInstanceGetIngestUrlAttributeType(&o.IngestUrl, v)
|
|
}
|
|
|
|
// GetQueryRangeUrl returns the QueryRangeUrl field value if set, zero value otherwise.
|
|
func (o *LogsInstance) GetQueryRangeUrl() (res LogsInstanceGetQueryRangeUrlRetType) {
|
|
res, _ = o.GetQueryRangeUrlOk()
|
|
return
|
|
}
|
|
|
|
// GetQueryRangeUrlOk returns a tuple with the QueryRangeUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetQueryRangeUrlOk() (ret LogsInstanceGetQueryRangeUrlRetType, ok bool) {
|
|
return getLogsInstanceGetQueryRangeUrlAttributeTypeOk(o.QueryRangeUrl)
|
|
}
|
|
|
|
// HasQueryRangeUrl returns a boolean if a field has been set.
|
|
func (o *LogsInstance) HasQueryRangeUrl() bool {
|
|
_, ok := o.GetQueryRangeUrlOk()
|
|
return ok
|
|
}
|
|
|
|
// SetQueryRangeUrl gets a reference to the given string and assigns it to the QueryRangeUrl field.
|
|
func (o *LogsInstance) SetQueryRangeUrl(v LogsInstanceGetQueryRangeUrlRetType) {
|
|
setLogsInstanceGetQueryRangeUrlAttributeType(&o.QueryRangeUrl, v)
|
|
}
|
|
|
|
// GetQueryUrl returns the QueryUrl field value if set, zero value otherwise.
|
|
func (o *LogsInstance) GetQueryUrl() (res LogsInstanceGetQueryUrlRetType) {
|
|
res, _ = o.GetQueryUrlOk()
|
|
return
|
|
}
|
|
|
|
// GetQueryUrlOk returns a tuple with the QueryUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetQueryUrlOk() (ret LogsInstanceGetQueryUrlRetType, ok bool) {
|
|
return getLogsInstanceGetQueryUrlAttributeTypeOk(o.QueryUrl)
|
|
}
|
|
|
|
// HasQueryUrl returns a boolean if a field has been set.
|
|
func (o *LogsInstance) HasQueryUrl() bool {
|
|
_, ok := o.GetQueryUrlOk()
|
|
return ok
|
|
}
|
|
|
|
// SetQueryUrl gets a reference to the given string and assigns it to the QueryUrl field.
|
|
func (o *LogsInstance) SetQueryUrl(v LogsInstanceGetQueryUrlRetType) {
|
|
setLogsInstanceGetQueryUrlAttributeType(&o.QueryUrl, v)
|
|
}
|
|
|
|
// GetRetentionDays returns the RetentionDays field value
|
|
func (o *LogsInstance) GetRetentionDays() (ret LogsInstanceGetRetentionDaysRetType) {
|
|
ret, _ = o.GetRetentionDaysOk()
|
|
return ret
|
|
}
|
|
|
|
// GetRetentionDaysOk returns a tuple with the RetentionDays field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetRetentionDaysOk() (ret LogsInstanceGetRetentionDaysRetType, ok bool) {
|
|
return getLogsInstanceGetRetentionDaysAttributeTypeOk(o.RetentionDays)
|
|
}
|
|
|
|
// SetRetentionDays sets field value
|
|
func (o *LogsInstance) SetRetentionDays(v LogsInstanceGetRetentionDaysRetType) {
|
|
setLogsInstanceGetRetentionDaysAttributeType(&o.RetentionDays, v)
|
|
}
|
|
|
|
// GetStatus returns the Status field value
|
|
func (o *LogsInstance) GetStatus() (ret LogsInstanceGetStatusRetType) {
|
|
ret, _ = o.GetStatusOk()
|
|
return ret
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LogsInstance) GetStatusOk() (ret LogsInstanceGetStatusRetType, ok bool) {
|
|
return getLogsInstanceGetStatusAttributeTypeOk(o.Status)
|
|
}
|
|
|
|
// SetStatus sets field value
|
|
func (o *LogsInstance) SetStatus(v LogsInstanceGetStatusRetType) {
|
|
setLogsInstanceGetStatusAttributeType(&o.Status, v)
|
|
}
|
|
|
|
func (o LogsInstance) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getLogsInstanceGetAclAttributeTypeOk(o.Acl); ok {
|
|
toSerialize["Acl"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetCreatedAttributeTypeOk(o.Created); ok {
|
|
toSerialize["Created"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetDatasourceUrlAttributeTypeOk(o.DatasourceUrl); ok {
|
|
toSerialize["DatasourceUrl"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetDescriptionAttributeTypeOk(o.Description); ok {
|
|
toSerialize["Description"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
|
|
toSerialize["DisplayName"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetIngestOtlpUrlAttributeTypeOk(o.IngestOtlpUrl); ok {
|
|
toSerialize["IngestOtlpUrl"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetIngestUrlAttributeTypeOk(o.IngestUrl); ok {
|
|
toSerialize["IngestUrl"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetQueryRangeUrlAttributeTypeOk(o.QueryRangeUrl); ok {
|
|
toSerialize["QueryRangeUrl"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetQueryUrlAttributeTypeOk(o.QueryUrl); ok {
|
|
toSerialize["QueryUrl"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok {
|
|
toSerialize["RetentionDays"] = val
|
|
}
|
|
if val, ok := getLogsInstanceGetStatusAttributeTypeOk(o.Status); ok {
|
|
toSerialize["Status"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableLogsInstance struct {
|
|
value *LogsInstance
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableLogsInstance) Get() *LogsInstance {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableLogsInstance) Set(val *LogsInstance) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableLogsInstance) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableLogsInstance) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableLogsInstance(val *LogsInstance) *NullableLogsInstance {
|
|
return &NullableLogsInstance{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableLogsInstance) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableLogsInstance) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|