188 lines
5.1 KiB
Go
188 lines
5.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"
|
||
|
)
|
||
|
|
||
|
// UpdateKeyRequest struct for UpdateKeyRequest
|
||
|
type UpdateKeyRequest struct {
|
||
|
Name *string `json:"name,omitempty"`
|
||
|
Allow *UpdateKeyRequestAllow `json:"allow,omitempty"`
|
||
|
Deny *UpdateKeyRequestDeny `json:"deny,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewUpdateKeyRequest instantiates a new UpdateKeyRequest 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 NewUpdateKeyRequest() *UpdateKeyRequest {
|
||
|
this := UpdateKeyRequest{}
|
||
|
return &this
|
||
|
}
|
||
|
|
||
|
// NewUpdateKeyRequestWithDefaults instantiates a new UpdateKeyRequest 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 NewUpdateKeyRequestWithDefaults() *UpdateKeyRequest {
|
||
|
this := UpdateKeyRequest{}
|
||
|
return &this
|
||
|
}
|
||
|
|
||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||
|
func (o *UpdateKeyRequest) 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 *UpdateKeyRequest) 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 *UpdateKeyRequest) 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 *UpdateKeyRequest) SetName(v string) {
|
||
|
o.Name = &v
|
||
|
}
|
||
|
|
||
|
// GetAllow returns the Allow field value if set, zero value otherwise.
|
||
|
func (o *UpdateKeyRequest) GetAllow() UpdateKeyRequestAllow {
|
||
|
if o == nil || o.Allow == nil {
|
||
|
var ret UpdateKeyRequestAllow
|
||
|
return ret
|
||
|
}
|
||
|
return *o.Allow
|
||
|
}
|
||
|
|
||
|
// GetAllowOk returns a tuple with the Allow field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *UpdateKeyRequest) GetAllowOk() (*UpdateKeyRequestAllow, bool) {
|
||
|
if o == nil || o.Allow == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Allow, true
|
||
|
}
|
||
|
|
||
|
// HasAllow returns a boolean if a field has been set.
|
||
|
func (o *UpdateKeyRequest) HasAllow() bool {
|
||
|
if o != nil && o.Allow != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetAllow gets a reference to the given UpdateKeyRequestAllow and assigns it to the Allow field.
|
||
|
func (o *UpdateKeyRequest) SetAllow(v UpdateKeyRequestAllow) {
|
||
|
o.Allow = &v
|
||
|
}
|
||
|
|
||
|
// GetDeny returns the Deny field value if set, zero value otherwise.
|
||
|
func (o *UpdateKeyRequest) GetDeny() UpdateKeyRequestDeny {
|
||
|
if o == nil || o.Deny == nil {
|
||
|
var ret UpdateKeyRequestDeny
|
||
|
return ret
|
||
|
}
|
||
|
return *o.Deny
|
||
|
}
|
||
|
|
||
|
// GetDenyOk returns a tuple with the Deny field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *UpdateKeyRequest) GetDenyOk() (*UpdateKeyRequestDeny, bool) {
|
||
|
if o == nil || o.Deny == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Deny, true
|
||
|
}
|
||
|
|
||
|
// HasDeny returns a boolean if a field has been set.
|
||
|
func (o *UpdateKeyRequest) HasDeny() bool {
|
||
|
if o != nil && o.Deny != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetDeny gets a reference to the given UpdateKeyRequestDeny and assigns it to the Deny field.
|
||
|
func (o *UpdateKeyRequest) SetDeny(v UpdateKeyRequestDeny) {
|
||
|
o.Deny = &v
|
||
|
}
|
||
|
|
||
|
func (o UpdateKeyRequest) MarshalJSON() ([]byte, error) {
|
||
|
toSerialize := map[string]interface{}{}
|
||
|
if o.Name != nil {
|
||
|
toSerialize["name"] = o.Name
|
||
|
}
|
||
|
if o.Allow != nil {
|
||
|
toSerialize["allow"] = o.Allow
|
||
|
}
|
||
|
if o.Deny != nil {
|
||
|
toSerialize["deny"] = o.Deny
|
||
|
}
|
||
|
return json.Marshal(toSerialize)
|
||
|
}
|
||
|
|
||
|
type NullableUpdateKeyRequest struct {
|
||
|
value *UpdateKeyRequest
|
||
|
isSet bool
|
||
|
}
|
||
|
|
||
|
func (v NullableUpdateKeyRequest) Get() *UpdateKeyRequest {
|
||
|
return v.value
|
||
|
}
|
||
|
|
||
|
func (v *NullableUpdateKeyRequest) Set(val *UpdateKeyRequest) {
|
||
|
v.value = val
|
||
|
v.isSet = true
|
||
|
}
|
||
|
|
||
|
func (v NullableUpdateKeyRequest) IsSet() bool {
|
||
|
return v.isSet
|
||
|
}
|
||
|
|
||
|
func (v *NullableUpdateKeyRequest) Unset() {
|
||
|
v.value = nil
|
||
|
v.isSet = false
|
||
|
}
|
||
|
|
||
|
func NewNullableUpdateKeyRequest(val *UpdateKeyRequest) *NullableUpdateKeyRequest {
|
||
|
return &NullableUpdateKeyRequest{value: val, isSet: true}
|
||
|
}
|
||
|
|
||
|
func (v NullableUpdateKeyRequest) MarshalJSON() ([]byte, error) {
|
||
|
return json.Marshal(v.value)
|
||
|
}
|
||
|
|
||
|
func (v *NullableUpdateKeyRequest) UnmarshalJSON(src []byte) error {
|
||
|
v.isSet = true
|
||
|
return json.Unmarshal(src, &v.value)
|
||
|
}
|
||
|
|
||
|
|