mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.5 KiB
Go
345 lines
9.5 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the DeploySessionUser type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeploySessionUser{}
|
|
|
|
// DeploySessionUser struct for DeploySessionUser
|
|
type DeploySessionUser struct {
|
|
// Groups is the caller's group list, always empty here: this console authorizes on the platform SuperAdmin fact alone, not on argocd RBAC groups. Absent for an anonymous caller.
|
|
Groups []string `json:"groups,omitempty"`
|
|
// Iss is the token issuer as the SPA expects to see it — the literal \"argocd\", so the UI never triggers an SSO redirect of its own. Absent for an anonymous caller.
|
|
Iss *string `json:"iss,omitempty"`
|
|
// LoggedIn reports whether this browser holds a session this console accepts.
|
|
LoggedIn *bool `json:"loggedIn,omitempty"`
|
|
// LoginURL is where an anonymous caller signs in. Absent once signed in.
|
|
LoginUrl *string `json:"loginUrl,omitempty"`
|
|
// LogoutURL is where a signed-in caller ends the session. Absent when anonymous.
|
|
LogoutUrl *string `json:"logoutUrl,omitempty"`
|
|
// Username is the validated principal's user ID — the opaque gateway id, which is what argocd's UI renders as the signed-in user here — or \"admin\" when the principal carries none. Absent when anonymous.
|
|
Username *string `json:"username,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeploySessionUser DeploySessionUser
|
|
|
|
// NewDeploySessionUser instantiates a new DeploySessionUser 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 NewDeploySessionUser() *DeploySessionUser {
|
|
this := DeploySessionUser{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeploySessionUserWithDefaults instantiates a new DeploySessionUser 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 NewDeploySessionUserWithDefaults() *DeploySessionUser {
|
|
this := DeploySessionUser{}
|
|
return &this
|
|
}
|
|
|
|
// GetGroups returns the Groups field value if set, zero value otherwise.
|
|
func (o *DeploySessionUser) GetGroups() []string {
|
|
if o == nil || IsNil(o.Groups) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Groups
|
|
}
|
|
|
|
// GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploySessionUser) GetGroupsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Groups) {
|
|
return nil, false
|
|
}
|
|
return o.Groups, true
|
|
}
|
|
|
|
// HasGroups returns a boolean if a field has been set.
|
|
func (o *DeploySessionUser) HasGroups() bool {
|
|
if o != nil && !IsNil(o.Groups) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGroups gets a reference to the given []string and assigns it to the Groups field.
|
|
func (o *DeploySessionUser) SetGroups(v []string) {
|
|
o.Groups = v
|
|
}
|
|
|
|
// GetIss returns the Iss field value if set, zero value otherwise.
|
|
func (o *DeploySessionUser) GetIss() string {
|
|
if o == nil || IsNil(o.Iss) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Iss
|
|
}
|
|
|
|
// GetIssOk returns a tuple with the Iss field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploySessionUser) GetIssOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Iss) {
|
|
return nil, false
|
|
}
|
|
return o.Iss, true
|
|
}
|
|
|
|
// HasIss returns a boolean if a field has been set.
|
|
func (o *DeploySessionUser) HasIss() bool {
|
|
if o != nil && !IsNil(o.Iss) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIss gets a reference to the given string and assigns it to the Iss field.
|
|
func (o *DeploySessionUser) SetIss(v string) {
|
|
o.Iss = &v
|
|
}
|
|
|
|
// GetLoggedIn returns the LoggedIn field value if set, zero value otherwise.
|
|
func (o *DeploySessionUser) GetLoggedIn() bool {
|
|
if o == nil || IsNil(o.LoggedIn) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.LoggedIn
|
|
}
|
|
|
|
// GetLoggedInOk returns a tuple with the LoggedIn field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploySessionUser) GetLoggedInOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.LoggedIn) {
|
|
return nil, false
|
|
}
|
|
return o.LoggedIn, true
|
|
}
|
|
|
|
// HasLoggedIn returns a boolean if a field has been set.
|
|
func (o *DeploySessionUser) HasLoggedIn() bool {
|
|
if o != nil && !IsNil(o.LoggedIn) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLoggedIn gets a reference to the given bool and assigns it to the LoggedIn field.
|
|
func (o *DeploySessionUser) SetLoggedIn(v bool) {
|
|
o.LoggedIn = &v
|
|
}
|
|
|
|
// GetLoginUrl returns the LoginUrl field value if set, zero value otherwise.
|
|
func (o *DeploySessionUser) GetLoginUrl() string {
|
|
if o == nil || IsNil(o.LoginUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.LoginUrl
|
|
}
|
|
|
|
// GetLoginUrlOk returns a tuple with the LoginUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploySessionUser) GetLoginUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.LoginUrl) {
|
|
return nil, false
|
|
}
|
|
return o.LoginUrl, true
|
|
}
|
|
|
|
// HasLoginUrl returns a boolean if a field has been set.
|
|
func (o *DeploySessionUser) HasLoginUrl() bool {
|
|
if o != nil && !IsNil(o.LoginUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLoginUrl gets a reference to the given string and assigns it to the LoginUrl field.
|
|
func (o *DeploySessionUser) SetLoginUrl(v string) {
|
|
o.LoginUrl = &v
|
|
}
|
|
|
|
// GetLogoutUrl returns the LogoutUrl field value if set, zero value otherwise.
|
|
func (o *DeploySessionUser) GetLogoutUrl() string {
|
|
if o == nil || IsNil(o.LogoutUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.LogoutUrl
|
|
}
|
|
|
|
// GetLogoutUrlOk returns a tuple with the LogoutUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploySessionUser) GetLogoutUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.LogoutUrl) {
|
|
return nil, false
|
|
}
|
|
return o.LogoutUrl, true
|
|
}
|
|
|
|
// HasLogoutUrl returns a boolean if a field has been set.
|
|
func (o *DeploySessionUser) HasLogoutUrl() bool {
|
|
if o != nil && !IsNil(o.LogoutUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLogoutUrl gets a reference to the given string and assigns it to the LogoutUrl field.
|
|
func (o *DeploySessionUser) SetLogoutUrl(v string) {
|
|
o.LogoutUrl = &v
|
|
}
|
|
|
|
// GetUsername returns the Username field value if set, zero value otherwise.
|
|
func (o *DeploySessionUser) GetUsername() string {
|
|
if o == nil || IsNil(o.Username) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Username
|
|
}
|
|
|
|
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploySessionUser) GetUsernameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Username) {
|
|
return nil, false
|
|
}
|
|
return o.Username, true
|
|
}
|
|
|
|
// HasUsername returns a boolean if a field has been set.
|
|
func (o *DeploySessionUser) HasUsername() bool {
|
|
if o != nil && !IsNil(o.Username) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUsername gets a reference to the given string and assigns it to the Username field.
|
|
func (o *DeploySessionUser) SetUsername(v string) {
|
|
o.Username = &v
|
|
}
|
|
|
|
func (o DeploySessionUser) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeploySessionUser) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Groups) {
|
|
toSerialize["groups"] = o.Groups
|
|
}
|
|
if !IsNil(o.Iss) {
|
|
toSerialize["iss"] = o.Iss
|
|
}
|
|
if !IsNil(o.LoggedIn) {
|
|
toSerialize["loggedIn"] = o.LoggedIn
|
|
}
|
|
if !IsNil(o.LoginUrl) {
|
|
toSerialize["loginUrl"] = o.LoginUrl
|
|
}
|
|
if !IsNil(o.LogoutUrl) {
|
|
toSerialize["logoutUrl"] = o.LogoutUrl
|
|
}
|
|
if !IsNil(o.Username) {
|
|
toSerialize["username"] = o.Username
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeploySessionUser) UnmarshalJSON(data []byte) (err error) {
|
|
varDeploySessionUser := _DeploySessionUser{}
|
|
|
|
err = json.Unmarshal(data, &varDeploySessionUser)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeploySessionUser(varDeploySessionUser)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "groups")
|
|
delete(additionalProperties, "iss")
|
|
delete(additionalProperties, "loggedIn")
|
|
delete(additionalProperties, "loginUrl")
|
|
delete(additionalProperties, "logoutUrl")
|
|
delete(additionalProperties, "username")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeploySessionUser struct {
|
|
value *DeploySessionUser
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeploySessionUser) Get() *DeploySessionUser {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeploySessionUser) Set(val *DeploySessionUser) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeploySessionUser) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeploySessionUser) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeploySessionUser(val *DeploySessionUser) *NullableDeploySessionUser {
|
|
return &NullableDeploySessionUser{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeploySessionUser) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeploySessionUser) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|