garage-admin-sdk-golang/model_import_key_request.go
2022-11-13 14:22:00 +01:00

166 lines
4.4 KiB
Go

/*
Garage Administration API v0+garage-v0.8.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package garage
import (
"encoding/json"
)
// ImportKeyRequest struct for ImportKeyRequest
type ImportKeyRequest struct {
Name string `json:"name"`
AccessKeyId string `json:"accessKeyId"`
SecretAccessKey string `json:"secretAccessKey"`
}
// NewImportKeyRequest instantiates a new ImportKeyRequest 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 NewImportKeyRequest(name string, accessKeyId string, secretAccessKey string) *ImportKeyRequest {
this := ImportKeyRequest{}
this.Name = name
this.AccessKeyId = accessKeyId
this.SecretAccessKey = secretAccessKey
return &this
}
// NewImportKeyRequestWithDefaults instantiates a new ImportKeyRequest 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 NewImportKeyRequestWithDefaults() *ImportKeyRequest {
this := ImportKeyRequest{}
return &this
}
// GetName returns the Name field value
func (o *ImportKeyRequest) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *ImportKeyRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *ImportKeyRequest) SetName(v string) {
o.Name = v
}
// GetAccessKeyId returns the AccessKeyId field value
func (o *ImportKeyRequest) GetAccessKeyId() string {
if o == nil {
var ret string
return ret
}
return o.AccessKeyId
}
// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value
// and a boolean to check if the value has been set.
func (o *ImportKeyRequest) GetAccessKeyIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AccessKeyId, true
}
// SetAccessKeyId sets field value
func (o *ImportKeyRequest) SetAccessKeyId(v string) {
o.AccessKeyId = v
}
// GetSecretAccessKey returns the SecretAccessKey field value
func (o *ImportKeyRequest) GetSecretAccessKey() string {
if o == nil {
var ret string
return ret
}
return o.SecretAccessKey
}
// GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field value
// and a boolean to check if the value has been set.
func (o *ImportKeyRequest) GetSecretAccessKeyOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.SecretAccessKey, true
}
// SetSecretAccessKey sets field value
func (o *ImportKeyRequest) SetSecretAccessKey(v string) {
o.SecretAccessKey = v
}
func (o ImportKeyRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["name"] = o.Name
}
if true {
toSerialize["accessKeyId"] = o.AccessKeyId
}
if true {
toSerialize["secretAccessKey"] = o.SecretAccessKey
}
return json.Marshal(toSerialize)
}
type NullableImportKeyRequest struct {
value *ImportKeyRequest
isSet bool
}
func (v NullableImportKeyRequest) Get() *ImportKeyRequest {
return v.value
}
func (v *NullableImportKeyRequest) Set(val *ImportKeyRequest) {
v.value = val
v.isSet = true
}
func (v NullableImportKeyRequest) IsSet() bool {
return v.isSet
}
func (v *NullableImportKeyRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableImportKeyRequest(val *ImportKeyRequest) *NullableImportKeyRequest {
return &NullableImportKeyRequest{value: val, isSet: true}
}
func (v NullableImportKeyRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableImportKeyRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}