feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
170
pkg/cdnbeta/model_loki_log_sink_credentials.go
Normal file
170
pkg/cdnbeta/model_loki_log_sink_credentials.go
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
/*
|
||||
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 LokiLogSinkCredentials type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &LokiLogSinkCredentials{}
|
||||
|
||||
/*
|
||||
types and functions for password
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type LokiLogSinkCredentialsGetPasswordAttributeType = *string
|
||||
|
||||
func getLokiLogSinkCredentialsGetPasswordAttributeTypeOk(arg LokiLogSinkCredentialsGetPasswordAttributeType) (ret LokiLogSinkCredentialsGetPasswordRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setLokiLogSinkCredentialsGetPasswordAttributeType(arg *LokiLogSinkCredentialsGetPasswordAttributeType, val LokiLogSinkCredentialsGetPasswordRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type LokiLogSinkCredentialsGetPasswordArgType = string
|
||||
type LokiLogSinkCredentialsGetPasswordRetType = string
|
||||
|
||||
/*
|
||||
types and functions for username
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type LokiLogSinkCredentialsGetUsernameAttributeType = *string
|
||||
|
||||
func getLokiLogSinkCredentialsGetUsernameAttributeTypeOk(arg LokiLogSinkCredentialsGetUsernameAttributeType) (ret LokiLogSinkCredentialsGetUsernameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setLokiLogSinkCredentialsGetUsernameAttributeType(arg *LokiLogSinkCredentialsGetUsernameAttributeType, val LokiLogSinkCredentialsGetUsernameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type LokiLogSinkCredentialsGetUsernameArgType = string
|
||||
type LokiLogSinkCredentialsGetUsernameRetType = string
|
||||
|
||||
// LokiLogSinkCredentials struct for LokiLogSinkCredentials
|
||||
type LokiLogSinkCredentials struct {
|
||||
// REQUIRED
|
||||
Password LokiLogSinkCredentialsGetPasswordAttributeType `json:"password" required:"true"`
|
||||
// REQUIRED
|
||||
Username LokiLogSinkCredentialsGetUsernameAttributeType `json:"username" required:"true"`
|
||||
}
|
||||
|
||||
type _LokiLogSinkCredentials LokiLogSinkCredentials
|
||||
|
||||
// NewLokiLogSinkCredentials instantiates a new LokiLogSinkCredentials 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 NewLokiLogSinkCredentials(password LokiLogSinkCredentialsGetPasswordArgType, username LokiLogSinkCredentialsGetUsernameArgType) *LokiLogSinkCredentials {
|
||||
this := LokiLogSinkCredentials{}
|
||||
setLokiLogSinkCredentialsGetPasswordAttributeType(&this.Password, password)
|
||||
setLokiLogSinkCredentialsGetUsernameAttributeType(&this.Username, username)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewLokiLogSinkCredentialsWithDefaults instantiates a new LokiLogSinkCredentials 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 NewLokiLogSinkCredentialsWithDefaults() *LokiLogSinkCredentials {
|
||||
this := LokiLogSinkCredentials{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetPassword returns the Password field value
|
||||
func (o *LokiLogSinkCredentials) GetPassword() (ret LokiLogSinkCredentialsGetPasswordRetType) {
|
||||
ret, _ = o.GetPasswordOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPasswordOk returns a tuple with the Password field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LokiLogSinkCredentials) GetPasswordOk() (ret LokiLogSinkCredentialsGetPasswordRetType, ok bool) {
|
||||
return getLokiLogSinkCredentialsGetPasswordAttributeTypeOk(o.Password)
|
||||
}
|
||||
|
||||
// SetPassword sets field value
|
||||
func (o *LokiLogSinkCredentials) SetPassword(v LokiLogSinkCredentialsGetPasswordRetType) {
|
||||
setLokiLogSinkCredentialsGetPasswordAttributeType(&o.Password, v)
|
||||
}
|
||||
|
||||
// GetUsername returns the Username field value
|
||||
func (o *LokiLogSinkCredentials) GetUsername() (ret LokiLogSinkCredentialsGetUsernameRetType) {
|
||||
ret, _ = o.GetUsernameOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetUsernameOk returns a tuple with the Username field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LokiLogSinkCredentials) GetUsernameOk() (ret LokiLogSinkCredentialsGetUsernameRetType, ok bool) {
|
||||
return getLokiLogSinkCredentialsGetUsernameAttributeTypeOk(o.Username)
|
||||
}
|
||||
|
||||
// SetUsername sets field value
|
||||
func (o *LokiLogSinkCredentials) SetUsername(v LokiLogSinkCredentialsGetUsernameRetType) {
|
||||
setLokiLogSinkCredentialsGetUsernameAttributeType(&o.Username, v)
|
||||
}
|
||||
|
||||
func (o LokiLogSinkCredentials) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getLokiLogSinkCredentialsGetPasswordAttributeTypeOk(o.Password); ok {
|
||||
toSerialize["Password"] = val
|
||||
}
|
||||
if val, ok := getLokiLogSinkCredentialsGetUsernameAttributeTypeOk(o.Username); ok {
|
||||
toSerialize["Username"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableLokiLogSinkCredentials struct {
|
||||
value *LokiLogSinkCredentials
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableLokiLogSinkCredentials) Get() *LokiLogSinkCredentials {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableLokiLogSinkCredentials) Set(val *LokiLogSinkCredentials) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableLokiLogSinkCredentials) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableLokiLogSinkCredentials) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableLokiLogSinkCredentials(val *LokiLogSinkCredentials) *NullableLokiLogSinkCredentials {
|
||||
return &NullableLokiLogSinkCredentials{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableLokiLogSinkCredentials) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableLokiLogSinkCredentials) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue