Files
sdk/model_remote_app.go

265 lines
6.7 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 RemoteApp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RemoteApp{}
// RemoteApp struct for RemoteApp
type RemoteApp struct {
No *int32 `json:"no,omitempty"`
RemoteAppArgs *string `json:"remoteAppArgs,omitempty"`
RemoteAppDir *string `json:"remoteAppDir,omitempty"`
RemoteAppName *string `json:"remoteAppName,omitempty"`
AdditionalProperties map[string]interface{}
}
type _RemoteApp RemoteApp
// NewRemoteApp instantiates a new RemoteApp 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 NewRemoteApp() *RemoteApp {
this := RemoteApp{}
return &this
}
// NewRemoteAppWithDefaults instantiates a new RemoteApp 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 NewRemoteAppWithDefaults() *RemoteApp {
this := RemoteApp{}
return &this
}
// GetNo returns the No field value if set, zero value otherwise.
func (o *RemoteApp) GetNo() int32 {
if o == nil || IsNil(o.No) {
var ret int32
return ret
}
return *o.No
}
// GetNoOk returns a tuple with the No field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RemoteApp) GetNoOk() (*int32, bool) {
if o == nil || IsNil(o.No) {
return nil, false
}
return o.No, true
}
// HasNo returns a boolean if a field has been set.
func (o *RemoteApp) HasNo() bool {
if o != nil && !IsNil(o.No) {
return true
}
return false
}
// SetNo gets a reference to the given int32 and assigns it to the No field.
func (o *RemoteApp) SetNo(v int32) {
o.No = &v
}
// GetRemoteAppArgs returns the RemoteAppArgs field value if set, zero value otherwise.
func (o *RemoteApp) GetRemoteAppArgs() string {
if o == nil || IsNil(o.RemoteAppArgs) {
var ret string
return ret
}
return *o.RemoteAppArgs
}
// GetRemoteAppArgsOk returns a tuple with the RemoteAppArgs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RemoteApp) GetRemoteAppArgsOk() (*string, bool) {
if o == nil || IsNil(o.RemoteAppArgs) {
return nil, false
}
return o.RemoteAppArgs, true
}
// HasRemoteAppArgs returns a boolean if a field has been set.
func (o *RemoteApp) HasRemoteAppArgs() bool {
if o != nil && !IsNil(o.RemoteAppArgs) {
return true
}
return false
}
// SetRemoteAppArgs gets a reference to the given string and assigns it to the RemoteAppArgs field.
func (o *RemoteApp) SetRemoteAppArgs(v string) {
o.RemoteAppArgs = &v
}
// GetRemoteAppDir returns the RemoteAppDir field value if set, zero value otherwise.
func (o *RemoteApp) GetRemoteAppDir() string {
if o == nil || IsNil(o.RemoteAppDir) {
var ret string
return ret
}
return *o.RemoteAppDir
}
// GetRemoteAppDirOk returns a tuple with the RemoteAppDir field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RemoteApp) GetRemoteAppDirOk() (*string, bool) {
if o == nil || IsNil(o.RemoteAppDir) {
return nil, false
}
return o.RemoteAppDir, true
}
// HasRemoteAppDir returns a boolean if a field has been set.
func (o *RemoteApp) HasRemoteAppDir() bool {
if o != nil && !IsNil(o.RemoteAppDir) {
return true
}
return false
}
// SetRemoteAppDir gets a reference to the given string and assigns it to the RemoteAppDir field.
func (o *RemoteApp) SetRemoteAppDir(v string) {
o.RemoteAppDir = &v
}
// GetRemoteAppName returns the RemoteAppName field value if set, zero value otherwise.
func (o *RemoteApp) GetRemoteAppName() string {
if o == nil || IsNil(o.RemoteAppName) {
var ret string
return ret
}
return *o.RemoteAppName
}
// GetRemoteAppNameOk returns a tuple with the RemoteAppName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RemoteApp) GetRemoteAppNameOk() (*string, bool) {
if o == nil || IsNil(o.RemoteAppName) {
return nil, false
}
return o.RemoteAppName, true
}
// HasRemoteAppName returns a boolean if a field has been set.
func (o *RemoteApp) HasRemoteAppName() bool {
if o != nil && !IsNil(o.RemoteAppName) {
return true
}
return false
}
// SetRemoteAppName gets a reference to the given string and assigns it to the RemoteAppName field.
func (o *RemoteApp) SetRemoteAppName(v string) {
o.RemoteAppName = &v
}
func (o RemoteApp) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RemoteApp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.No) {
toSerialize["no"] = o.No
}
if !IsNil(o.RemoteAppArgs) {
toSerialize["remoteAppArgs"] = o.RemoteAppArgs
}
if !IsNil(o.RemoteAppDir) {
toSerialize["remoteAppDir"] = o.RemoteAppDir
}
if !IsNil(o.RemoteAppName) {
toSerialize["remoteAppName"] = o.RemoteAppName
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *RemoteApp) UnmarshalJSON(data []byte) (err error) {
varRemoteApp := _RemoteApp{}
err = json.Unmarshal(data, &varRemoteApp)
if err != nil {
return err
}
*o = RemoteApp(varRemoteApp)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "no")
delete(additionalProperties, "remoteAppArgs")
delete(additionalProperties, "remoteAppDir")
delete(additionalProperties, "remoteAppName")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableRemoteApp struct {
value *RemoteApp
isSet bool
}
func (v NullableRemoteApp) Get() *RemoteApp {
return v.value
}
func (v *NullableRemoteApp) Set(val *RemoteApp) {
v.value = val
v.isSet = true
}
func (v NullableRemoteApp) IsSet() bool {
return v.isSet
}
func (v *NullableRemoteApp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRemoteApp(val *RemoteApp) *NullableRemoteApp {
return &NullableRemoteApp{value: val, isSet: true}
}
func (v NullableRemoteApp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRemoteApp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}