115 lines
3.1 KiB
Go
115 lines
3.1 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"
|
|
)
|
|
|
|
// AddKeyRequest struct for AddKeyRequest
|
|
type AddKeyRequest struct {
|
|
Name *string `json:"name,omitempty"`
|
|
}
|
|
|
|
// NewAddKeyRequest instantiates a new AddKeyRequest 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 NewAddKeyRequest() *AddKeyRequest {
|
|
this := AddKeyRequest{}
|
|
return &this
|
|
}
|
|
|
|
// NewAddKeyRequestWithDefaults instantiates a new AddKeyRequest 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 NewAddKeyRequestWithDefaults() *AddKeyRequest {
|
|
this := AddKeyRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *AddKeyRequest) GetName() string {
|
|
if o == nil || o.Name == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AddKeyRequest) GetNameOk() (*string, bool) {
|
|
if o == nil || o.Name == nil {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *AddKeyRequest) HasName() bool {
|
|
if o != nil && o.Name != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *AddKeyRequest) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
func (o AddKeyRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Name != nil {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableAddKeyRequest struct {
|
|
value *AddKeyRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAddKeyRequest) Get() *AddKeyRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAddKeyRequest) Set(val *AddKeyRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAddKeyRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAddKeyRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAddKeyRequest(val *AddKeyRequest) *NullableAddKeyRequest {
|
|
return &NullableAddKeyRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAddKeyRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAddKeyRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|