terraform-provider-stackitp.../pkg/cdnbeta/model_loki_log_sink_create.go
2026-01-21 09:07:29 +01:00

213 lines
6.6 KiB
Go

/*
CDN API
API used to create and manage your CDN distributions.
API version: 1beta2.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cdnbeta
import (
"encoding/json"
)
// checks if the LokiLogSinkCreate type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LokiLogSinkCreate{}
/*
types and functions for credentials
*/
// isModel
type LokiLogSinkCreateGetCredentialsAttributeType = *LokiLogSinkCredentials
type LokiLogSinkCreateGetCredentialsArgType = LokiLogSinkCredentials
type LokiLogSinkCreateGetCredentialsRetType = LokiLogSinkCredentials
func getLokiLogSinkCreateGetCredentialsAttributeTypeOk(arg LokiLogSinkCreateGetCredentialsAttributeType) (ret LokiLogSinkCreateGetCredentialsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLokiLogSinkCreateGetCredentialsAttributeType(arg *LokiLogSinkCreateGetCredentialsAttributeType, val LokiLogSinkCreateGetCredentialsRetType) {
*arg = &val
}
/*
types and functions for pushUrl
*/
// isNotNullableString
type LokiLogSinkCreateGetPushUrlAttributeType = *string
func getLokiLogSinkCreateGetPushUrlAttributeTypeOk(arg LokiLogSinkCreateGetPushUrlAttributeType) (ret LokiLogSinkCreateGetPushUrlRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLokiLogSinkCreateGetPushUrlAttributeType(arg *LokiLogSinkCreateGetPushUrlAttributeType, val LokiLogSinkCreateGetPushUrlRetType) {
*arg = &val
}
type LokiLogSinkCreateGetPushUrlArgType = string
type LokiLogSinkCreateGetPushUrlRetType = string
/*
types and functions for type
*/
// isNotNullableString
type LokiLogSinkCreateGetTypeAttributeType = *string
func getLokiLogSinkCreateGetTypeAttributeTypeOk(arg LokiLogSinkCreateGetTypeAttributeType) (ret LokiLogSinkCreateGetTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLokiLogSinkCreateGetTypeAttributeType(arg *LokiLogSinkCreateGetTypeAttributeType, val LokiLogSinkCreateGetTypeRetType) {
*arg = &val
}
type LokiLogSinkCreateGetTypeArgType = string
type LokiLogSinkCreateGetTypeRetType = string
// LokiLogSinkCreate struct for LokiLogSinkCreate
type LokiLogSinkCreate struct {
// REQUIRED
Credentials LokiLogSinkCreateGetCredentialsAttributeType `json:"credentials" required:"true"`
// REQUIRED
PushUrl LokiLogSinkCreateGetPushUrlAttributeType `json:"pushUrl" required:"true"`
// REQUIRED
Type LokiLogSinkCreateGetTypeAttributeType `json:"type" required:"true"`
}
type _LokiLogSinkCreate LokiLogSinkCreate
// NewLokiLogSinkCreate instantiates a new LokiLogSinkCreate 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 NewLokiLogSinkCreate(credentials LokiLogSinkCreateGetCredentialsArgType, pushUrl LokiLogSinkCreateGetPushUrlArgType, types LokiLogSinkCreateGetTypeArgType) *LokiLogSinkCreate {
this := LokiLogSinkCreate{}
setLokiLogSinkCreateGetCredentialsAttributeType(&this.Credentials, credentials)
setLokiLogSinkCreateGetPushUrlAttributeType(&this.PushUrl, pushUrl)
setLokiLogSinkCreateGetTypeAttributeType(&this.Type, types)
return &this
}
// NewLokiLogSinkCreateWithDefaults instantiates a new LokiLogSinkCreate 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 NewLokiLogSinkCreateWithDefaults() *LokiLogSinkCreate {
this := LokiLogSinkCreate{}
return &this
}
// GetCredentials returns the Credentials field value
func (o *LokiLogSinkCreate) GetCredentials() (ret LokiLogSinkCreateGetCredentialsRetType) {
ret, _ = o.GetCredentialsOk()
return ret
}
// GetCredentialsOk returns a tuple with the Credentials field value
// and a boolean to check if the value has been set.
func (o *LokiLogSinkCreate) GetCredentialsOk() (ret LokiLogSinkCreateGetCredentialsRetType, ok bool) {
return getLokiLogSinkCreateGetCredentialsAttributeTypeOk(o.Credentials)
}
// SetCredentials sets field value
func (o *LokiLogSinkCreate) SetCredentials(v LokiLogSinkCreateGetCredentialsRetType) {
setLokiLogSinkCreateGetCredentialsAttributeType(&o.Credentials, v)
}
// GetPushUrl returns the PushUrl field value
func (o *LokiLogSinkCreate) GetPushUrl() (ret LokiLogSinkCreateGetPushUrlRetType) {
ret, _ = o.GetPushUrlOk()
return ret
}
// GetPushUrlOk returns a tuple with the PushUrl field value
// and a boolean to check if the value has been set.
func (o *LokiLogSinkCreate) GetPushUrlOk() (ret LokiLogSinkCreateGetPushUrlRetType, ok bool) {
return getLokiLogSinkCreateGetPushUrlAttributeTypeOk(o.PushUrl)
}
// SetPushUrl sets field value
func (o *LokiLogSinkCreate) SetPushUrl(v LokiLogSinkCreateGetPushUrlRetType) {
setLokiLogSinkCreateGetPushUrlAttributeType(&o.PushUrl, v)
}
// GetType returns the Type field value
func (o *LokiLogSinkCreate) GetType() (ret LokiLogSinkCreateGetTypeRetType) {
ret, _ = o.GetTypeOk()
return ret
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *LokiLogSinkCreate) GetTypeOk() (ret LokiLogSinkCreateGetTypeRetType, ok bool) {
return getLokiLogSinkCreateGetTypeAttributeTypeOk(o.Type)
}
// SetType sets field value
func (o *LokiLogSinkCreate) SetType(v LokiLogSinkCreateGetTypeRetType) {
setLokiLogSinkCreateGetTypeAttributeType(&o.Type, v)
}
func (o LokiLogSinkCreate) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getLokiLogSinkCreateGetCredentialsAttributeTypeOk(o.Credentials); ok {
toSerialize["Credentials"] = val
}
if val, ok := getLokiLogSinkCreateGetPushUrlAttributeTypeOk(o.PushUrl); ok {
toSerialize["PushUrl"] = val
}
if val, ok := getLokiLogSinkCreateGetTypeAttributeTypeOk(o.Type); ok {
toSerialize["Type"] = val
}
return toSerialize, nil
}
type NullableLokiLogSinkCreate struct {
value *LokiLogSinkCreate
isSet bool
}
func (v NullableLokiLogSinkCreate) Get() *LokiLogSinkCreate {
return v.value
}
func (v *NullableLokiLogSinkCreate) Set(val *LokiLogSinkCreate) {
v.value = val
v.isSet = true
}
func (v NullableLokiLogSinkCreate) IsSet() bool {
return v.isSet
}
func (v *NullableLokiLogSinkCreate) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLokiLogSinkCreate(val *LokiLogSinkCreate) *NullableLokiLogSinkCreate {
return &NullableLokiLogSinkCreate{value: val, isSet: true}
}
func (v NullableLokiLogSinkCreate) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLokiLogSinkCreate) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}