garage-admin-sdk-golang/model_add_node_200_response_inner.go

162 lines
4.8 KiB
Go
Raw Normal View History

2022-11-13 13:22:00 +00:00
/*
2023-11-22 17:28:14 +00:00
Garage Administration API v0+garage-v0.9.0
2022-11-13 13:22:00 +00:00
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!*
2023-11-22 17:28:14 +00:00
API version: v0.9.0
2022-11-13 13:22:00 +00:00
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package garage
import (
"encoding/json"
)
// AddNode200ResponseInner struct for AddNode200ResponseInner
type AddNode200ResponseInner struct {
Success *bool `json:"success,omitempty"`
Error NullableString `json:"error,omitempty"`
}
// NewAddNode200ResponseInner instantiates a new AddNode200ResponseInner 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 NewAddNode200ResponseInner() *AddNode200ResponseInner {
this := AddNode200ResponseInner{}
return &this
}
// NewAddNode200ResponseInnerWithDefaults instantiates a new AddNode200ResponseInner 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 NewAddNode200ResponseInnerWithDefaults() *AddNode200ResponseInner {
this := AddNode200ResponseInner{}
return &this
}
// GetSuccess returns the Success field value if set, zero value otherwise.
func (o *AddNode200ResponseInner) GetSuccess() bool {
if o == nil || o.Success == nil {
var ret bool
return ret
}
return *o.Success
}
// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AddNode200ResponseInner) GetSuccessOk() (*bool, bool) {
if o == nil || o.Success == nil {
return nil, false
}
return o.Success, true
}
// HasSuccess returns a boolean if a field has been set.
func (o *AddNode200ResponseInner) HasSuccess() bool {
if o != nil && o.Success != nil {
return true
}
return false
}
// SetSuccess gets a reference to the given bool and assigns it to the Success field.
func (o *AddNode200ResponseInner) SetSuccess(v bool) {
o.Success = &v
}
// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AddNode200ResponseInner) GetError() string {
if o == nil || o.Error.Get() == nil {
var ret string
return ret
}
return *o.Error.Get()
}
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AddNode200ResponseInner) GetErrorOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Error.Get(), o.Error.IsSet()
}
// HasError returns a boolean if a field has been set.
func (o *AddNode200ResponseInner) HasError() bool {
if o != nil && o.Error.IsSet() {
return true
}
return false
}
// SetError gets a reference to the given NullableString and assigns it to the Error field.
func (o *AddNode200ResponseInner) SetError(v string) {
o.Error.Set(&v)
}
// SetErrorNil sets the value for Error to be an explicit nil
func (o *AddNode200ResponseInner) SetErrorNil() {
o.Error.Set(nil)
}
// UnsetError ensures that no value is present for Error, not even an explicit nil
func (o *AddNode200ResponseInner) UnsetError() {
o.Error.Unset()
}
func (o AddNode200ResponseInner) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Success != nil {
toSerialize["success"] = o.Success
}
if o.Error.IsSet() {
toSerialize["error"] = o.Error.Get()
}
return json.Marshal(toSerialize)
}
type NullableAddNode200ResponseInner struct {
value *AddNode200ResponseInner
isSet bool
}
func (v NullableAddNode200ResponseInner) Get() *AddNode200ResponseInner {
return v.value
}
func (v *NullableAddNode200ResponseInner) Set(val *AddNode200ResponseInner) {
v.value = val
v.isSet = true
}
func (v NullableAddNode200ResponseInner) IsSet() bool {
return v.isSet
}
func (v *NullableAddNode200ResponseInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAddNode200ResponseInner(val *AddNode200ResponseInner) *NullableAddNode200ResponseInner {
return &NullableAddNode200ResponseInner{value: val, isSet: true}
}
func (v NullableAddNode200ResponseInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAddNode200ResponseInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}