Files
sdk/model_author_deploy_request.go

193 lines
5.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 AuthorDeployRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AuthorDeployRequest{}
// AuthorDeployRequest struct for AuthorDeployRequest
type AuthorDeployRequest struct {
// Project is the deployed project's id. Required.
Project *string `json:"project,omitempty"`
// RepoURL is the source repository the project was built from. Empty means a hand-built project with nothing to attribute — an honest no-op, not an error.
RepoUrl *string `json:"repoUrl,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AuthorDeployRequest AuthorDeployRequest
// NewAuthorDeployRequest instantiates a new AuthorDeployRequest 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 NewAuthorDeployRequest() *AuthorDeployRequest {
this := AuthorDeployRequest{}
return &this
}
// NewAuthorDeployRequestWithDefaults instantiates a new AuthorDeployRequest 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 NewAuthorDeployRequestWithDefaults() *AuthorDeployRequest {
this := AuthorDeployRequest{}
return &this
}
// GetProject returns the Project field value if set, zero value otherwise.
func (o *AuthorDeployRequest) GetProject() string {
if o == nil || IsNil(o.Project) {
var ret string
return ret
}
return *o.Project
}
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthorDeployRequest) GetProjectOk() (*string, bool) {
if o == nil || IsNil(o.Project) {
return nil, false
}
return o.Project, true
}
// HasProject returns a boolean if a field has been set.
func (o *AuthorDeployRequest) HasProject() bool {
if o != nil && !IsNil(o.Project) {
return true
}
return false
}
// SetProject gets a reference to the given string and assigns it to the Project field.
func (o *AuthorDeployRequest) SetProject(v string) {
o.Project = &v
}
// GetRepoUrl returns the RepoUrl field value if set, zero value otherwise.
func (o *AuthorDeployRequest) GetRepoUrl() string {
if o == nil || IsNil(o.RepoUrl) {
var ret string
return ret
}
return *o.RepoUrl
}
// GetRepoUrlOk returns a tuple with the RepoUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthorDeployRequest) GetRepoUrlOk() (*string, bool) {
if o == nil || IsNil(o.RepoUrl) {
return nil, false
}
return o.RepoUrl, true
}
// HasRepoUrl returns a boolean if a field has been set.
func (o *AuthorDeployRequest) HasRepoUrl() bool {
if o != nil && !IsNil(o.RepoUrl) {
return true
}
return false
}
// SetRepoUrl gets a reference to the given string and assigns it to the RepoUrl field.
func (o *AuthorDeployRequest) SetRepoUrl(v string) {
o.RepoUrl = &v
}
func (o AuthorDeployRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AuthorDeployRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Project) {
toSerialize["project"] = o.Project
}
if !IsNil(o.RepoUrl) {
toSerialize["repoUrl"] = o.RepoUrl
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AuthorDeployRequest) UnmarshalJSON(data []byte) (err error) {
varAuthorDeployRequest := _AuthorDeployRequest{}
err = json.Unmarshal(data, &varAuthorDeployRequest)
if err != nil {
return err
}
*o = AuthorDeployRequest(varAuthorDeployRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "project")
delete(additionalProperties, "repoUrl")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAuthorDeployRequest struct {
value *AuthorDeployRequest
isSet bool
}
func (v NullableAuthorDeployRequest) Get() *AuthorDeployRequest {
return v.value
}
func (v *NullableAuthorDeployRequest) Set(val *AuthorDeployRequest) {
v.value = val
v.isSet = true
}
func (v NullableAuthorDeployRequest) IsSet() bool {
return v.isSet
}
func (v *NullableAuthorDeployRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAuthorDeployRequest(val *AuthorDeployRequest) *NullableAuthorDeployRequest {
return &NullableAuthorDeployRequest{value: val, isSet: true}
}
func (v NullableAuthorDeployRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAuthorDeployRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}