Files
sdk/model_sweep.go

709 lines
18 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 Sweep type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Sweep{}
// Sweep struct for Sweep
type Sweep struct {
Asset *string `json:"asset,omitempty"`
Command *string `json:"command,omitempty"`
CreatedTime *string `json:"createdTime,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
ErrorText *string `json:"errorText,omitempty"`
Name *string `json:"name,omitempty"`
Owner *string `json:"owner,omitempty"`
Provider *string `json:"provider,omitempty"`
RawResult *string `json:"rawResult,omitempty"`
Result *string `json:"result,omitempty"`
ResultSummary *string `json:"resultSummary,omitempty"`
Runner *string `json:"runner,omitempty"`
State *string `json:"state,omitempty"`
Target *string `json:"target,omitempty"`
TargetMode *string `json:"targetMode,omitempty"`
UpdatedTime *string `json:"updatedTime,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Sweep Sweep
// NewSweep instantiates a new Sweep 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 NewSweep() *Sweep {
this := Sweep{}
return &this
}
// NewSweepWithDefaults instantiates a new Sweep 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 NewSweepWithDefaults() *Sweep {
this := Sweep{}
return &this
}
// GetAsset returns the Asset field value if set, zero value otherwise.
func (o *Sweep) GetAsset() string {
if o == nil || IsNil(o.Asset) {
var ret string
return ret
}
return *o.Asset
}
// GetAssetOk returns a tuple with the Asset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetAssetOk() (*string, bool) {
if o == nil || IsNil(o.Asset) {
return nil, false
}
return o.Asset, true
}
// HasAsset returns a boolean if a field has been set.
func (o *Sweep) HasAsset() bool {
if o != nil && !IsNil(o.Asset) {
return true
}
return false
}
// SetAsset gets a reference to the given string and assigns it to the Asset field.
func (o *Sweep) SetAsset(v string) {
o.Asset = &v
}
// GetCommand returns the Command field value if set, zero value otherwise.
func (o *Sweep) GetCommand() string {
if o == nil || IsNil(o.Command) {
var ret string
return ret
}
return *o.Command
}
// GetCommandOk returns a tuple with the Command field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetCommandOk() (*string, bool) {
if o == nil || IsNil(o.Command) {
return nil, false
}
return o.Command, true
}
// HasCommand returns a boolean if a field has been set.
func (o *Sweep) HasCommand() bool {
if o != nil && !IsNil(o.Command) {
return true
}
return false
}
// SetCommand gets a reference to the given string and assigns it to the Command field.
func (o *Sweep) SetCommand(v string) {
o.Command = &v
}
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
func (o *Sweep) GetCreatedTime() string {
if o == nil || IsNil(o.CreatedTime) {
var ret string
return ret
}
return *o.CreatedTime
}
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetCreatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.CreatedTime) {
return nil, false
}
return o.CreatedTime, true
}
// HasCreatedTime returns a boolean if a field has been set.
func (o *Sweep) HasCreatedTime() bool {
if o != nil && !IsNil(o.CreatedTime) {
return true
}
return false
}
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
func (o *Sweep) SetCreatedTime(v string) {
o.CreatedTime = &v
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *Sweep) GetDisplayName() string {
if o == nil || IsNil(o.DisplayName) {
var ret string
return ret
}
return *o.DisplayName
}
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetDisplayNameOk() (*string, bool) {
if o == nil || IsNil(o.DisplayName) {
return nil, false
}
return o.DisplayName, true
}
// HasDisplayName returns a boolean if a field has been set.
func (o *Sweep) HasDisplayName() bool {
if o != nil && !IsNil(o.DisplayName) {
return true
}
return false
}
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
func (o *Sweep) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetErrorText returns the ErrorText field value if set, zero value otherwise.
func (o *Sweep) GetErrorText() string {
if o == nil || IsNil(o.ErrorText) {
var ret string
return ret
}
return *o.ErrorText
}
// GetErrorTextOk returns a tuple with the ErrorText field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetErrorTextOk() (*string, bool) {
if o == nil || IsNil(o.ErrorText) {
return nil, false
}
return o.ErrorText, true
}
// HasErrorText returns a boolean if a field has been set.
func (o *Sweep) HasErrorText() bool {
if o != nil && !IsNil(o.ErrorText) {
return true
}
return false
}
// SetErrorText gets a reference to the given string and assigns it to the ErrorText field.
func (o *Sweep) SetErrorText(v string) {
o.ErrorText = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Sweep) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *Sweep) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Sweep) SetName(v string) {
o.Name = &v
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *Sweep) GetOwner() string {
if o == nil || IsNil(o.Owner) {
var ret string
return ret
}
return *o.Owner
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetOwnerOk() (*string, bool) {
if o == nil || IsNil(o.Owner) {
return nil, false
}
return o.Owner, true
}
// HasOwner returns a boolean if a field has been set.
func (o *Sweep) HasOwner() bool {
if o != nil && !IsNil(o.Owner) {
return true
}
return false
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *Sweep) SetOwner(v string) {
o.Owner = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *Sweep) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *Sweep) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *Sweep) SetProvider(v string) {
o.Provider = &v
}
// GetRawResult returns the RawResult field value if set, zero value otherwise.
func (o *Sweep) GetRawResult() string {
if o == nil || IsNil(o.RawResult) {
var ret string
return ret
}
return *o.RawResult
}
// GetRawResultOk returns a tuple with the RawResult field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetRawResultOk() (*string, bool) {
if o == nil || IsNil(o.RawResult) {
return nil, false
}
return o.RawResult, true
}
// HasRawResult returns a boolean if a field has been set.
func (o *Sweep) HasRawResult() bool {
if o != nil && !IsNil(o.RawResult) {
return true
}
return false
}
// SetRawResult gets a reference to the given string and assigns it to the RawResult field.
func (o *Sweep) SetRawResult(v string) {
o.RawResult = &v
}
// GetResult returns the Result field value if set, zero value otherwise.
func (o *Sweep) GetResult() string {
if o == nil || IsNil(o.Result) {
var ret string
return ret
}
return *o.Result
}
// GetResultOk returns a tuple with the Result field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetResultOk() (*string, bool) {
if o == nil || IsNil(o.Result) {
return nil, false
}
return o.Result, true
}
// HasResult returns a boolean if a field has been set.
func (o *Sweep) HasResult() bool {
if o != nil && !IsNil(o.Result) {
return true
}
return false
}
// SetResult gets a reference to the given string and assigns it to the Result field.
func (o *Sweep) SetResult(v string) {
o.Result = &v
}
// GetResultSummary returns the ResultSummary field value if set, zero value otherwise.
func (o *Sweep) GetResultSummary() string {
if o == nil || IsNil(o.ResultSummary) {
var ret string
return ret
}
return *o.ResultSummary
}
// GetResultSummaryOk returns a tuple with the ResultSummary field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetResultSummaryOk() (*string, bool) {
if o == nil || IsNil(o.ResultSummary) {
return nil, false
}
return o.ResultSummary, true
}
// HasResultSummary returns a boolean if a field has been set.
func (o *Sweep) HasResultSummary() bool {
if o != nil && !IsNil(o.ResultSummary) {
return true
}
return false
}
// SetResultSummary gets a reference to the given string and assigns it to the ResultSummary field.
func (o *Sweep) SetResultSummary(v string) {
o.ResultSummary = &v
}
// GetRunner returns the Runner field value if set, zero value otherwise.
func (o *Sweep) GetRunner() string {
if o == nil || IsNil(o.Runner) {
var ret string
return ret
}
return *o.Runner
}
// GetRunnerOk returns a tuple with the Runner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetRunnerOk() (*string, bool) {
if o == nil || IsNil(o.Runner) {
return nil, false
}
return o.Runner, true
}
// HasRunner returns a boolean if a field has been set.
func (o *Sweep) HasRunner() bool {
if o != nil && !IsNil(o.Runner) {
return true
}
return false
}
// SetRunner gets a reference to the given string and assigns it to the Runner field.
func (o *Sweep) SetRunner(v string) {
o.Runner = &v
}
// GetState returns the State field value if set, zero value otherwise.
func (o *Sweep) GetState() string {
if o == nil || IsNil(o.State) {
var ret string
return ret
}
return *o.State
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetStateOk() (*string, bool) {
if o == nil || IsNil(o.State) {
return nil, false
}
return o.State, true
}
// HasState returns a boolean if a field has been set.
func (o *Sweep) HasState() bool {
if o != nil && !IsNil(o.State) {
return true
}
return false
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *Sweep) SetState(v string) {
o.State = &v
}
// GetTarget returns the Target field value if set, zero value otherwise.
func (o *Sweep) GetTarget() string {
if o == nil || IsNil(o.Target) {
var ret string
return ret
}
return *o.Target
}
// GetTargetOk returns a tuple with the Target field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetTargetOk() (*string, bool) {
if o == nil || IsNil(o.Target) {
return nil, false
}
return o.Target, true
}
// HasTarget returns a boolean if a field has been set.
func (o *Sweep) HasTarget() bool {
if o != nil && !IsNil(o.Target) {
return true
}
return false
}
// SetTarget gets a reference to the given string and assigns it to the Target field.
func (o *Sweep) SetTarget(v string) {
o.Target = &v
}
// GetTargetMode returns the TargetMode field value if set, zero value otherwise.
func (o *Sweep) GetTargetMode() string {
if o == nil || IsNil(o.TargetMode) {
var ret string
return ret
}
return *o.TargetMode
}
// GetTargetModeOk returns a tuple with the TargetMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetTargetModeOk() (*string, bool) {
if o == nil || IsNil(o.TargetMode) {
return nil, false
}
return o.TargetMode, true
}
// HasTargetMode returns a boolean if a field has been set.
func (o *Sweep) HasTargetMode() bool {
if o != nil && !IsNil(o.TargetMode) {
return true
}
return false
}
// SetTargetMode gets a reference to the given string and assigns it to the TargetMode field.
func (o *Sweep) SetTargetMode(v string) {
o.TargetMode = &v
}
// GetUpdatedTime returns the UpdatedTime field value if set, zero value otherwise.
func (o *Sweep) GetUpdatedTime() string {
if o == nil || IsNil(o.UpdatedTime) {
var ret string
return ret
}
return *o.UpdatedTime
}
// GetUpdatedTimeOk returns a tuple with the UpdatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sweep) GetUpdatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.UpdatedTime) {
return nil, false
}
return o.UpdatedTime, true
}
// HasUpdatedTime returns a boolean if a field has been set.
func (o *Sweep) HasUpdatedTime() bool {
if o != nil && !IsNil(o.UpdatedTime) {
return true
}
return false
}
// SetUpdatedTime gets a reference to the given string and assigns it to the UpdatedTime field.
func (o *Sweep) SetUpdatedTime(v string) {
o.UpdatedTime = &v
}
func (o Sweep) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Sweep) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Asset) {
toSerialize["asset"] = o.Asset
}
if !IsNil(o.Command) {
toSerialize["command"] = o.Command
}
if !IsNil(o.CreatedTime) {
toSerialize["createdTime"] = o.CreatedTime
}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.ErrorText) {
toSerialize["errorText"] = o.ErrorText
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Owner) {
toSerialize["owner"] = o.Owner
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
if !IsNil(o.RawResult) {
toSerialize["rawResult"] = o.RawResult
}
if !IsNil(o.Result) {
toSerialize["result"] = o.Result
}
if !IsNil(o.ResultSummary) {
toSerialize["resultSummary"] = o.ResultSummary
}
if !IsNil(o.Runner) {
toSerialize["runner"] = o.Runner
}
if !IsNil(o.State) {
toSerialize["state"] = o.State
}
if !IsNil(o.Target) {
toSerialize["target"] = o.Target
}
if !IsNil(o.TargetMode) {
toSerialize["targetMode"] = o.TargetMode
}
if !IsNil(o.UpdatedTime) {
toSerialize["updatedTime"] = o.UpdatedTime
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *Sweep) UnmarshalJSON(data []byte) (err error) {
varSweep := _Sweep{}
err = json.Unmarshal(data, &varSweep)
if err != nil {
return err
}
*o = Sweep(varSweep)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "asset")
delete(additionalProperties, "command")
delete(additionalProperties, "createdTime")
delete(additionalProperties, "displayName")
delete(additionalProperties, "errorText")
delete(additionalProperties, "name")
delete(additionalProperties, "owner")
delete(additionalProperties, "provider")
delete(additionalProperties, "rawResult")
delete(additionalProperties, "result")
delete(additionalProperties, "resultSummary")
delete(additionalProperties, "runner")
delete(additionalProperties, "state")
delete(additionalProperties, "target")
delete(additionalProperties, "targetMode")
delete(additionalProperties, "updatedTime")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableSweep struct {
value *Sweep
isSet bool
}
func (v NullableSweep) Get() *Sweep {
return v.value
}
func (v *NullableSweep) Set(val *Sweep) {
v.value = val
v.isSet = true
}
func (v NullableSweep) IsSet() bool {
return v.isSet
}
func (v *NullableSweep) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSweep(val *Sweep) *NullableSweep {
return &NullableSweep{value: val, isSet: true}
}
func (v NullableSweep) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSweep) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}