refactor: expose generated code and client business logic to share with Kapacitor (#103)
* refactor: take clients out of internal * refactor: move stdio to pkg * Move internal/api to api * refactor: final changes for Kapacitor to access shared functionality * chore: regenerate mocks * fix: bad automated refactor * chore: extra formatting not caught by make fmt
This commit is contained in:
221
api/model_onboarding_response.gen.go
Normal file
221
api/model_onboarding_response.gen.go
Normal file
@ -0,0 +1,221 @@
|
||||
/*
|
||||
* 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"
|
||||
)
|
||||
|
||||
// OnboardingResponse struct for OnboardingResponse
|
||||
type OnboardingResponse struct {
|
||||
User *UserResponse `json:"user,omitempty"`
|
||||
Org *Organization `json:"org,omitempty"`
|
||||
Bucket *Bucket `json:"bucket,omitempty"`
|
||||
Auth *Authorization `json:"auth,omitempty"`
|
||||
}
|
||||
|
||||
// NewOnboardingResponse instantiates a new OnboardingResponse 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 NewOnboardingResponse() *OnboardingResponse {
|
||||
this := OnboardingResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewOnboardingResponseWithDefaults instantiates a new OnboardingResponse 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 NewOnboardingResponseWithDefaults() *OnboardingResponse {
|
||||
this := OnboardingResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetUser returns the User field value if set, zero value otherwise.
|
||||
func (o *OnboardingResponse) GetUser() UserResponse {
|
||||
if o == nil || o.User == nil {
|
||||
var ret UserResponse
|
||||
return ret
|
||||
}
|
||||
return *o.User
|
||||
}
|
||||
|
||||
// GetUserOk returns a tuple with the User field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OnboardingResponse) GetUserOk() (*UserResponse, bool) {
|
||||
if o == nil || o.User == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.User, true
|
||||
}
|
||||
|
||||
// HasUser returns a boolean if a field has been set.
|
||||
func (o *OnboardingResponse) HasUser() bool {
|
||||
if o != nil && o.User != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUser gets a reference to the given UserResponse and assigns it to the User field.
|
||||
func (o *OnboardingResponse) SetUser(v UserResponse) {
|
||||
o.User = &v
|
||||
}
|
||||
|
||||
// GetOrg returns the Org field value if set, zero value otherwise.
|
||||
func (o *OnboardingResponse) GetOrg() Organization {
|
||||
if o == nil || o.Org == nil {
|
||||
var ret Organization
|
||||
return ret
|
||||
}
|
||||
return *o.Org
|
||||
}
|
||||
|
||||
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OnboardingResponse) GetOrgOk() (*Organization, bool) {
|
||||
if o == nil || o.Org == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Org, true
|
||||
}
|
||||
|
||||
// HasOrg returns a boolean if a field has been set.
|
||||
func (o *OnboardingResponse) HasOrg() bool {
|
||||
if o != nil && o.Org != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOrg gets a reference to the given Organization and assigns it to the Org field.
|
||||
func (o *OnboardingResponse) SetOrg(v Organization) {
|
||||
o.Org = &v
|
||||
}
|
||||
|
||||
// GetBucket returns the Bucket field value if set, zero value otherwise.
|
||||
func (o *OnboardingResponse) GetBucket() Bucket {
|
||||
if o == nil || o.Bucket == nil {
|
||||
var ret Bucket
|
||||
return ret
|
||||
}
|
||||
return *o.Bucket
|
||||
}
|
||||
|
||||
// GetBucketOk returns a tuple with the Bucket field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OnboardingResponse) GetBucketOk() (*Bucket, bool) {
|
||||
if o == nil || o.Bucket == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Bucket, true
|
||||
}
|
||||
|
||||
// HasBucket returns a boolean if a field has been set.
|
||||
func (o *OnboardingResponse) HasBucket() bool {
|
||||
if o != nil && o.Bucket != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBucket gets a reference to the given Bucket and assigns it to the Bucket field.
|
||||
func (o *OnboardingResponse) SetBucket(v Bucket) {
|
||||
o.Bucket = &v
|
||||
}
|
||||
|
||||
// GetAuth returns the Auth field value if set, zero value otherwise.
|
||||
func (o *OnboardingResponse) GetAuth() Authorization {
|
||||
if o == nil || o.Auth == nil {
|
||||
var ret Authorization
|
||||
return ret
|
||||
}
|
||||
return *o.Auth
|
||||
}
|
||||
|
||||
// GetAuthOk returns a tuple with the Auth field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OnboardingResponse) GetAuthOk() (*Authorization, bool) {
|
||||
if o == nil || o.Auth == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Auth, true
|
||||
}
|
||||
|
||||
// HasAuth returns a boolean if a field has been set.
|
||||
func (o *OnboardingResponse) HasAuth() bool {
|
||||
if o != nil && o.Auth != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAuth gets a reference to the given Authorization and assigns it to the Auth field.
|
||||
func (o *OnboardingResponse) SetAuth(v Authorization) {
|
||||
o.Auth = &v
|
||||
}
|
||||
|
||||
func (o OnboardingResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.User != nil {
|
||||
toSerialize["user"] = o.User
|
||||
}
|
||||
if o.Org != nil {
|
||||
toSerialize["org"] = o.Org
|
||||
}
|
||||
if o.Bucket != nil {
|
||||
toSerialize["bucket"] = o.Bucket
|
||||
}
|
||||
if o.Auth != nil {
|
||||
toSerialize["auth"] = o.Auth
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableOnboardingResponse struct {
|
||||
value *OnboardingResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableOnboardingResponse) Get() *OnboardingResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableOnboardingResponse) Set(val *OnboardingResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableOnboardingResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableOnboardingResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableOnboardingResponse(val *OnboardingResponse) *NullableOnboardingResponse {
|
||||
return &NullableOnboardingResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableOnboardingResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableOnboardingResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
Reference in New Issue
Block a user