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_bucket_credentials.go
Normal file
170
pkg/cdnbeta/model_bucket_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 BucketCredentials type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &BucketCredentials{}
|
||||
|
||||
/*
|
||||
types and functions for accessKeyId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BucketCredentialsGetAccessKeyIdAttributeType = *string
|
||||
|
||||
func getBucketCredentialsGetAccessKeyIdAttributeTypeOk(arg BucketCredentialsGetAccessKeyIdAttributeType) (ret BucketCredentialsGetAccessKeyIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBucketCredentialsGetAccessKeyIdAttributeType(arg *BucketCredentialsGetAccessKeyIdAttributeType, val BucketCredentialsGetAccessKeyIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BucketCredentialsGetAccessKeyIdArgType = string
|
||||
type BucketCredentialsGetAccessKeyIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for secretAccessKey
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BucketCredentialsGetSecretAccessKeyAttributeType = *string
|
||||
|
||||
func getBucketCredentialsGetSecretAccessKeyAttributeTypeOk(arg BucketCredentialsGetSecretAccessKeyAttributeType) (ret BucketCredentialsGetSecretAccessKeyRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBucketCredentialsGetSecretAccessKeyAttributeType(arg *BucketCredentialsGetSecretAccessKeyAttributeType, val BucketCredentialsGetSecretAccessKeyRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BucketCredentialsGetSecretAccessKeyArgType = string
|
||||
type BucketCredentialsGetSecretAccessKeyRetType = string
|
||||
|
||||
// BucketCredentials struct for BucketCredentials
|
||||
type BucketCredentials struct {
|
||||
// REQUIRED
|
||||
AccessKeyId BucketCredentialsGetAccessKeyIdAttributeType `json:"accessKeyId" required:"true"`
|
||||
// REQUIRED
|
||||
SecretAccessKey BucketCredentialsGetSecretAccessKeyAttributeType `json:"secretAccessKey" required:"true"`
|
||||
}
|
||||
|
||||
type _BucketCredentials BucketCredentials
|
||||
|
||||
// NewBucketCredentials instantiates a new BucketCredentials 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 NewBucketCredentials(accessKeyId BucketCredentialsGetAccessKeyIdArgType, secretAccessKey BucketCredentialsGetSecretAccessKeyArgType) *BucketCredentials {
|
||||
this := BucketCredentials{}
|
||||
setBucketCredentialsGetAccessKeyIdAttributeType(&this.AccessKeyId, accessKeyId)
|
||||
setBucketCredentialsGetSecretAccessKeyAttributeType(&this.SecretAccessKey, secretAccessKey)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBucketCredentialsWithDefaults instantiates a new BucketCredentials 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 NewBucketCredentialsWithDefaults() *BucketCredentials {
|
||||
this := BucketCredentials{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAccessKeyId returns the AccessKeyId field value
|
||||
func (o *BucketCredentials) GetAccessKeyId() (ret BucketCredentialsGetAccessKeyIdRetType) {
|
||||
ret, _ = o.GetAccessKeyIdOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BucketCredentials) GetAccessKeyIdOk() (ret BucketCredentialsGetAccessKeyIdRetType, ok bool) {
|
||||
return getBucketCredentialsGetAccessKeyIdAttributeTypeOk(o.AccessKeyId)
|
||||
}
|
||||
|
||||
// SetAccessKeyId sets field value
|
||||
func (o *BucketCredentials) SetAccessKeyId(v BucketCredentialsGetAccessKeyIdRetType) {
|
||||
setBucketCredentialsGetAccessKeyIdAttributeType(&o.AccessKeyId, v)
|
||||
}
|
||||
|
||||
// GetSecretAccessKey returns the SecretAccessKey field value
|
||||
func (o *BucketCredentials) GetSecretAccessKey() (ret BucketCredentialsGetSecretAccessKeyRetType) {
|
||||
ret, _ = o.GetSecretAccessKeyOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BucketCredentials) GetSecretAccessKeyOk() (ret BucketCredentialsGetSecretAccessKeyRetType, ok bool) {
|
||||
return getBucketCredentialsGetSecretAccessKeyAttributeTypeOk(o.SecretAccessKey)
|
||||
}
|
||||
|
||||
// SetSecretAccessKey sets field value
|
||||
func (o *BucketCredentials) SetSecretAccessKey(v BucketCredentialsGetSecretAccessKeyRetType) {
|
||||
setBucketCredentialsGetSecretAccessKeyAttributeType(&o.SecretAccessKey, v)
|
||||
}
|
||||
|
||||
func (o BucketCredentials) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getBucketCredentialsGetAccessKeyIdAttributeTypeOk(o.AccessKeyId); ok {
|
||||
toSerialize["AccessKeyId"] = val
|
||||
}
|
||||
if val, ok := getBucketCredentialsGetSecretAccessKeyAttributeTypeOk(o.SecretAccessKey); ok {
|
||||
toSerialize["SecretAccessKey"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableBucketCredentials struct {
|
||||
value *BucketCredentials
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBucketCredentials) Get() *BucketCredentials {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBucketCredentials) Set(val *BucketCredentials) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBucketCredentials) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBucketCredentials) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBucketCredentials(val *BucketCredentials) *NullableBucketCredentials {
|
||||
return &NullableBucketCredentials{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBucketCredentials) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBucketCredentials) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue