mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.3 KiB
Go
193 lines
5.3 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 DeploySessionEnded type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeploySessionEnded{}
|
|
|
|
// DeploySessionEnded struct for DeploySessionEnded
|
|
type DeploySessionEnded struct {
|
|
// LoggedIn is always false — this is the answer to having just signed out, so it states the resulting session state rather than reporting the request's outcome. It is not omitempty: false is the whole answer.
|
|
LoggedIn *bool `json:"loggedIn,omitempty"`
|
|
// LoginURL is where to sign in again. Always present, because a caller that has just signed out is exactly the caller who needs it.
|
|
LoginUrl *string `json:"loginUrl,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeploySessionEnded DeploySessionEnded
|
|
|
|
// NewDeploySessionEnded instantiates a new DeploySessionEnded 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 NewDeploySessionEnded() *DeploySessionEnded {
|
|
this := DeploySessionEnded{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeploySessionEndedWithDefaults instantiates a new DeploySessionEnded 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 NewDeploySessionEndedWithDefaults() *DeploySessionEnded {
|
|
this := DeploySessionEnded{}
|
|
return &this
|
|
}
|
|
|
|
// GetLoggedIn returns the LoggedIn field value if set, zero value otherwise.
|
|
func (o *DeploySessionEnded) 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 *DeploySessionEnded) 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 *DeploySessionEnded) 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 *DeploySessionEnded) SetLoggedIn(v bool) {
|
|
o.LoggedIn = &v
|
|
}
|
|
|
|
// GetLoginUrl returns the LoginUrl field value if set, zero value otherwise.
|
|
func (o *DeploySessionEnded) 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 *DeploySessionEnded) 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 *DeploySessionEnded) 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 *DeploySessionEnded) SetLoginUrl(v string) {
|
|
o.LoginUrl = &v
|
|
}
|
|
|
|
func (o DeploySessionEnded) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeploySessionEnded) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.LoggedIn) {
|
|
toSerialize["loggedIn"] = o.LoggedIn
|
|
}
|
|
if !IsNil(o.LoginUrl) {
|
|
toSerialize["loginUrl"] = o.LoginUrl
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeploySessionEnded) UnmarshalJSON(data []byte) (err error) {
|
|
varDeploySessionEnded := _DeploySessionEnded{}
|
|
|
|
err = json.Unmarshal(data, &varDeploySessionEnded)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeploySessionEnded(varDeploySessionEnded)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "loggedIn")
|
|
delete(additionalProperties, "loginUrl")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeploySessionEnded struct {
|
|
value *DeploySessionEnded
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeploySessionEnded) Get() *DeploySessionEnded {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeploySessionEnded) Set(val *DeploySessionEnded) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeploySessionEnded) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeploySessionEnded) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeploySessionEnded(val *DeploySessionEnded) *NullableDeploySessionEnded {
|
|
return &NullableDeploySessionEnded{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeploySessionEnded) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeploySessionEnded) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|