Files
sdk/model_platform_deploy_logs.go

231 lines
6.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 PlatformDeployLogs type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlatformDeployLogs{}
// PlatformDeployLogs struct for PlatformDeployLogs
type PlatformDeployLogs struct {
// DeploymentID is the deployment these logs belong to.
DeploymentId *string `json:"deploymentId,omitempty"`
// Logs is the recorded status timeline followed by the streamed pod output, newline-separated.
Logs *string `json:"logs,omitempty"`
// Source says which pod the log body carries — `build`, `app`, or `none` when neither pod was reachable — so a console can label the pane honestly.
Source *string `json:"source,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PlatformDeployLogs PlatformDeployLogs
// NewPlatformDeployLogs instantiates a new PlatformDeployLogs 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 NewPlatformDeployLogs() *PlatformDeployLogs {
this := PlatformDeployLogs{}
return &this
}
// NewPlatformDeployLogsWithDefaults instantiates a new PlatformDeployLogs 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 NewPlatformDeployLogsWithDefaults() *PlatformDeployLogs {
this := PlatformDeployLogs{}
return &this
}
// GetDeploymentId returns the DeploymentId field value if set, zero value otherwise.
func (o *PlatformDeployLogs) GetDeploymentId() string {
if o == nil || IsNil(o.DeploymentId) {
var ret string
return ret
}
return *o.DeploymentId
}
// GetDeploymentIdOk returns a tuple with the DeploymentId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDeployLogs) GetDeploymentIdOk() (*string, bool) {
if o == nil || IsNil(o.DeploymentId) {
return nil, false
}
return o.DeploymentId, true
}
// HasDeploymentId returns a boolean if a field has been set.
func (o *PlatformDeployLogs) HasDeploymentId() bool {
if o != nil && !IsNil(o.DeploymentId) {
return true
}
return false
}
// SetDeploymentId gets a reference to the given string and assigns it to the DeploymentId field.
func (o *PlatformDeployLogs) SetDeploymentId(v string) {
o.DeploymentId = &v
}
// GetLogs returns the Logs field value if set, zero value otherwise.
func (o *PlatformDeployLogs) GetLogs() string {
if o == nil || IsNil(o.Logs) {
var ret string
return ret
}
return *o.Logs
}
// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDeployLogs) GetLogsOk() (*string, bool) {
if o == nil || IsNil(o.Logs) {
return nil, false
}
return o.Logs, true
}
// HasLogs returns a boolean if a field has been set.
func (o *PlatformDeployLogs) HasLogs() bool {
if o != nil && !IsNil(o.Logs) {
return true
}
return false
}
// SetLogs gets a reference to the given string and assigns it to the Logs field.
func (o *PlatformDeployLogs) SetLogs(v string) {
o.Logs = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *PlatformDeployLogs) GetSource() string {
if o == nil || IsNil(o.Source) {
var ret string
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDeployLogs) GetSourceOk() (*string, bool) {
if o == nil || IsNil(o.Source) {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *PlatformDeployLogs) HasSource() bool {
if o != nil && !IsNil(o.Source) {
return true
}
return false
}
// SetSource gets a reference to the given string and assigns it to the Source field.
func (o *PlatformDeployLogs) SetSource(v string) {
o.Source = &v
}
func (o PlatformDeployLogs) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlatformDeployLogs) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DeploymentId) {
toSerialize["deploymentId"] = o.DeploymentId
}
if !IsNil(o.Logs) {
toSerialize["logs"] = o.Logs
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PlatformDeployLogs) UnmarshalJSON(data []byte) (err error) {
varPlatformDeployLogs := _PlatformDeployLogs{}
err = json.Unmarshal(data, &varPlatformDeployLogs)
if err != nil {
return err
}
*o = PlatformDeployLogs(varPlatformDeployLogs)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "deploymentId")
delete(additionalProperties, "logs")
delete(additionalProperties, "source")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePlatformDeployLogs struct {
value *PlatformDeployLogs
isSet bool
}
func (v NullablePlatformDeployLogs) Get() *PlatformDeployLogs {
return v.value
}
func (v *NullablePlatformDeployLogs) Set(val *PlatformDeployLogs) {
v.value = val
v.isSet = true
}
func (v NullablePlatformDeployLogs) IsSet() bool {
return v.isSet
}
func (v *NullablePlatformDeployLogs) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlatformDeployLogs(val *PlatformDeployLogs) *NullablePlatformDeployLogs {
return &NullablePlatformDeployLogs{value: val, isSet: true}
}
func (v NullablePlatformDeployLogs) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlatformDeployLogs) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}