influx-cli/api/model_authorization_update_request.gen.go
2022-02-01 14:53:34 -06:00

156 lines
4.5 KiB
Go

/*
* Subset of Influx API covered by Influx CLI
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* API version: 2.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"encoding/json"
)
// AuthorizationUpdateRequest struct for AuthorizationUpdateRequest
type AuthorizationUpdateRequest struct {
// Status of the token. If `inactive`, requests using the token will be rejected.
Status *string `json:"status,omitempty" yaml:"status,omitempty"`
// A description of the token.
Description *string `json:"description,omitempty" yaml:"description,omitempty"`
}
// NewAuthorizationUpdateRequest instantiates a new AuthorizationUpdateRequest 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 NewAuthorizationUpdateRequest() *AuthorizationUpdateRequest {
this := AuthorizationUpdateRequest{}
var status string = "active"
this.Status = &status
return &this
}
// NewAuthorizationUpdateRequestWithDefaults instantiates a new AuthorizationUpdateRequest 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 NewAuthorizationUpdateRequestWithDefaults() *AuthorizationUpdateRequest {
this := AuthorizationUpdateRequest{}
var status string = "active"
this.Status = &status
return &this
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *AuthorizationUpdateRequest) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthorizationUpdateRequest) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *AuthorizationUpdateRequest) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *AuthorizationUpdateRequest) SetStatus(v string) {
o.Status = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *AuthorizationUpdateRequest) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthorizationUpdateRequest) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *AuthorizationUpdateRequest) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *AuthorizationUpdateRequest) SetDescription(v string) {
o.Description = &v
}
func (o AuthorizationUpdateRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Status != nil {
toSerialize["status"] = o.Status
}
if o.Description != nil {
toSerialize["description"] = o.Description
}
return json.Marshal(toSerialize)
}
type NullableAuthorizationUpdateRequest struct {
value *AuthorizationUpdateRequest
isSet bool
}
func (v NullableAuthorizationUpdateRequest) Get() *AuthorizationUpdateRequest {
return v.value
}
func (v *NullableAuthorizationUpdateRequest) Set(val *AuthorizationUpdateRequest) {
v.value = val
v.isSet = true
}
func (v NullableAuthorizationUpdateRequest) IsSet() bool {
return v.isSet
}
func (v *NullableAuthorizationUpdateRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAuthorizationUpdateRequest(val *AuthorizationUpdateRequest) *NullableAuthorizationUpdateRequest {
return &NullableAuthorizationUpdateRequest{value: val, isSet: true}
}
func (v NullableAuthorizationUpdateRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAuthorizationUpdateRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}