329 lines
8.3 KiB
Go
329 lines
8.3 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"
|
|
"time"
|
|
)
|
|
|
|
// Organization struct for Organization
|
|
type Organization struct {
|
|
Links *OrganizationLinks `json:"links,omitempty" yaml:"links,omitempty"`
|
|
Id *string `json:"id,omitempty" yaml:"id,omitempty"`
|
|
Name string `json:"name" yaml:"name"`
|
|
Description *string `json:"description,omitempty" yaml:"description,omitempty"`
|
|
CreatedAt *time.Time `json:"createdAt,omitempty" yaml:"createdAt,omitempty"`
|
|
UpdatedAt *time.Time `json:"updatedAt,omitempty" yaml:"updatedAt,omitempty"`
|
|
// If inactive the organization is inactive.
|
|
Status *string `json:"status,omitempty" yaml:"status,omitempty"`
|
|
}
|
|
|
|
// NewOrganization instantiates a new Organization 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 NewOrganization(name string) *Organization {
|
|
this := Organization{}
|
|
this.Name = name
|
|
var status string = "active"
|
|
this.Status = &status
|
|
return &this
|
|
}
|
|
|
|
// NewOrganizationWithDefaults instantiates a new Organization 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 NewOrganizationWithDefaults() *Organization {
|
|
this := Organization{}
|
|
var status string = "active"
|
|
this.Status = &status
|
|
return &this
|
|
}
|
|
|
|
// GetLinks returns the Links field value if set, zero value otherwise.
|
|
func (o *Organization) GetLinks() OrganizationLinks {
|
|
if o == nil || o.Links == nil {
|
|
var ret OrganizationLinks
|
|
return ret
|
|
}
|
|
return *o.Links
|
|
}
|
|
|
|
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Organization) GetLinksOk() (*OrganizationLinks, bool) {
|
|
if o == nil || o.Links == nil {
|
|
return nil, false
|
|
}
|
|
return o.Links, true
|
|
}
|
|
|
|
// HasLinks returns a boolean if a field has been set.
|
|
func (o *Organization) HasLinks() bool {
|
|
if o != nil && o.Links != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLinks gets a reference to the given OrganizationLinks and assigns it to the Links field.
|
|
func (o *Organization) SetLinks(v OrganizationLinks) {
|
|
o.Links = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *Organization) GetId() string {
|
|
if o == nil || o.Id == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Organization) GetIdOk() (*string, bool) {
|
|
if o == nil || o.Id == nil {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *Organization) HasId() bool {
|
|
if o != nil && o.Id != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *Organization) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *Organization) GetName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Organization) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *Organization) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *Organization) 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 *Organization) 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 *Organization) 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 *Organization) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *Organization) GetCreatedAt() time.Time {
|
|
if o == nil || o.CreatedAt == nil {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Organization) GetCreatedAtOk() (*time.Time, bool) {
|
|
if o == nil || o.CreatedAt == nil {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *Organization) HasCreatedAt() bool {
|
|
if o != nil && o.CreatedAt != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
|
func (o *Organization) SetCreatedAt(v time.Time) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *Organization) GetUpdatedAt() time.Time {
|
|
if o == nil || o.UpdatedAt == nil {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.UpdatedAt
|
|
}
|
|
|
|
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Organization) GetUpdatedAtOk() (*time.Time, bool) {
|
|
if o == nil || o.UpdatedAt == nil {
|
|
return nil, false
|
|
}
|
|
return o.UpdatedAt, true
|
|
}
|
|
|
|
// HasUpdatedAt returns a boolean if a field has been set.
|
|
func (o *Organization) HasUpdatedAt() bool {
|
|
if o != nil && o.UpdatedAt != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
|
func (o *Organization) SetUpdatedAt(v time.Time) {
|
|
o.UpdatedAt = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *Organization) 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 *Organization) 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 *Organization) 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 *Organization) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o Organization) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Links != nil {
|
|
toSerialize["links"] = o.Links
|
|
}
|
|
if o.Id != nil {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if true {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if o.Description != nil {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if o.CreatedAt != nil {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if o.UpdatedAt != nil {
|
|
toSerialize["updatedAt"] = o.UpdatedAt
|
|
}
|
|
if o.Status != nil {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableOrganization struct {
|
|
value *Organization
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableOrganization) Get() *Organization {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableOrganization) Set(val *Organization) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableOrganization) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableOrganization) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableOrganization(val *Organization) *NullableOrganization {
|
|
return &NullableOrganization{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableOrganization) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableOrganization) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|