influx-cli/api/model_resource_owner_all_of.gen.go
Andrew Lee e5707cd63c
feat: allow setting membership type in influx org members add (#402)
* add owners endpoints to cli.yml

* run make openapi and mock

* add owner listing, adding and removing

* fix: update tests to remove getUser indirection
2022-06-28 16:06:58 -06:00

118 lines
3.0 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"
)
// ResourceOwnerAllOf struct for ResourceOwnerAllOf
type ResourceOwnerAllOf struct {
Role *string `json:"role,omitempty" yaml:"role,omitempty"`
}
// NewResourceOwnerAllOf instantiates a new ResourceOwnerAllOf 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 NewResourceOwnerAllOf() *ResourceOwnerAllOf {
this := ResourceOwnerAllOf{}
var role string = "owner"
this.Role = &role
return &this
}
// NewResourceOwnerAllOfWithDefaults instantiates a new ResourceOwnerAllOf 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 NewResourceOwnerAllOfWithDefaults() *ResourceOwnerAllOf {
this := ResourceOwnerAllOf{}
var role string = "owner"
this.Role = &role
return &this
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *ResourceOwnerAllOf) GetRole() string {
if o == nil || o.Role == nil {
var ret string
return ret
}
return *o.Role
}
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourceOwnerAllOf) GetRoleOk() (*string, bool) {
if o == nil || o.Role == nil {
return nil, false
}
return o.Role, true
}
// HasRole returns a boolean if a field has been set.
func (o *ResourceOwnerAllOf) HasRole() bool {
if o != nil && o.Role != nil {
return true
}
return false
}
// SetRole gets a reference to the given string and assigns it to the Role field.
func (o *ResourceOwnerAllOf) SetRole(v string) {
o.Role = &v
}
func (o ResourceOwnerAllOf) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Role != nil {
toSerialize["role"] = o.Role
}
return json.Marshal(toSerialize)
}
type NullableResourceOwnerAllOf struct {
value *ResourceOwnerAllOf
isSet bool
}
func (v NullableResourceOwnerAllOf) Get() *ResourceOwnerAllOf {
return v.value
}
func (v *NullableResourceOwnerAllOf) Set(val *ResourceOwnerAllOf) {
v.value = val
v.isSet = true
}
func (v NullableResourceOwnerAllOf) IsSet() bool {
return v.isSet
}
func (v *NullableResourceOwnerAllOf) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResourceOwnerAllOf(val *ResourceOwnerAllOf) *NullableResourceOwnerAllOf {
return &NullableResourceOwnerAllOf{value: val, isSet: true}
}
func (v NullableResourceOwnerAllOf) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResourceOwnerAllOf) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}