Files
sdk/model_environment_proposal.go

269 lines
7.2 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 EnvironmentProposal type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EnvironmentProposal{}
// EnvironmentProposal struct for EnvironmentProposal
type EnvironmentProposal struct {
// Install is the install script the agent checked.
Install *string `json:"install,omitempty"`
// Note is what the agent found and checked, in its own words.
Note *string `json:"note,omitempty"`
// Secrets are the environment variables the agent found the codebase reads. Some may not be set yet; setting them is a person's act, not the agent's.
Secrets []string `json:"secrets,omitempty"`
// Start is the start command the agent checked, or empty.
Start *string `json:"start,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EnvironmentProposal EnvironmentProposal
// NewEnvironmentProposal instantiates a new EnvironmentProposal 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 NewEnvironmentProposal() *EnvironmentProposal {
this := EnvironmentProposal{}
return &this
}
// NewEnvironmentProposalWithDefaults instantiates a new EnvironmentProposal 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 NewEnvironmentProposalWithDefaults() *EnvironmentProposal {
this := EnvironmentProposal{}
return &this
}
// GetInstall returns the Install field value if set, zero value otherwise.
func (o *EnvironmentProposal) GetInstall() string {
if o == nil || IsNil(o.Install) {
var ret string
return ret
}
return *o.Install
}
// GetInstallOk returns a tuple with the Install field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EnvironmentProposal) GetInstallOk() (*string, bool) {
if o == nil || IsNil(o.Install) {
return nil, false
}
return o.Install, true
}
// HasInstall returns a boolean if a field has been set.
func (o *EnvironmentProposal) HasInstall() bool {
if o != nil && !IsNil(o.Install) {
return true
}
return false
}
// SetInstall gets a reference to the given string and assigns it to the Install field.
func (o *EnvironmentProposal) SetInstall(v string) {
o.Install = &v
}
// GetNote returns the Note field value if set, zero value otherwise.
func (o *EnvironmentProposal) GetNote() string {
if o == nil || IsNil(o.Note) {
var ret string
return ret
}
return *o.Note
}
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EnvironmentProposal) GetNoteOk() (*string, bool) {
if o == nil || IsNil(o.Note) {
return nil, false
}
return o.Note, true
}
// HasNote returns a boolean if a field has been set.
func (o *EnvironmentProposal) HasNote() bool {
if o != nil && !IsNil(o.Note) {
return true
}
return false
}
// SetNote gets a reference to the given string and assigns it to the Note field.
func (o *EnvironmentProposal) SetNote(v string) {
o.Note = &v
}
// GetSecrets returns the Secrets field value if set, zero value otherwise.
func (o *EnvironmentProposal) GetSecrets() []string {
if o == nil || IsNil(o.Secrets) {
var ret []string
return ret
}
return o.Secrets
}
// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EnvironmentProposal) GetSecretsOk() ([]string, bool) {
if o == nil || IsNil(o.Secrets) {
return nil, false
}
return o.Secrets, true
}
// HasSecrets returns a boolean if a field has been set.
func (o *EnvironmentProposal) HasSecrets() bool {
if o != nil && !IsNil(o.Secrets) {
return true
}
return false
}
// SetSecrets gets a reference to the given []string and assigns it to the Secrets field.
func (o *EnvironmentProposal) SetSecrets(v []string) {
o.Secrets = v
}
// GetStart returns the Start field value if set, zero value otherwise.
func (o *EnvironmentProposal) GetStart() string {
if o == nil || IsNil(o.Start) {
var ret string
return ret
}
return *o.Start
}
// GetStartOk returns a tuple with the Start field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EnvironmentProposal) GetStartOk() (*string, bool) {
if o == nil || IsNil(o.Start) {
return nil, false
}
return o.Start, true
}
// HasStart returns a boolean if a field has been set.
func (o *EnvironmentProposal) HasStart() bool {
if o != nil && !IsNil(o.Start) {
return true
}
return false
}
// SetStart gets a reference to the given string and assigns it to the Start field.
func (o *EnvironmentProposal) SetStart(v string) {
o.Start = &v
}
func (o EnvironmentProposal) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EnvironmentProposal) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Install) {
toSerialize["install"] = o.Install
}
if !IsNil(o.Note) {
toSerialize["note"] = o.Note
}
if !IsNil(o.Secrets) {
toSerialize["secrets"] = o.Secrets
}
if !IsNil(o.Start) {
toSerialize["start"] = o.Start
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EnvironmentProposal) UnmarshalJSON(data []byte) (err error) {
varEnvironmentProposal := _EnvironmentProposal{}
err = json.Unmarshal(data, &varEnvironmentProposal)
if err != nil {
return err
}
*o = EnvironmentProposal(varEnvironmentProposal)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "install")
delete(additionalProperties, "note")
delete(additionalProperties, "secrets")
delete(additionalProperties, "start")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEnvironmentProposal struct {
value *EnvironmentProposal
isSet bool
}
func (v NullableEnvironmentProposal) Get() *EnvironmentProposal {
return v.value
}
func (v *NullableEnvironmentProposal) Set(val *EnvironmentProposal) {
v.value = val
v.isSet = true
}
func (v NullableEnvironmentProposal) IsSet() bool {
return v.isSet
}
func (v *NullableEnvironmentProposal) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEnvironmentProposal(val *EnvironmentProposal) *NullableEnvironmentProposal {
return &NullableEnvironmentProposal{value: val, isSet: true}
}
func (v NullableEnvironmentProposal) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEnvironmentProposal) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}