Files
apiclient/model_replace_result.go
zeekayandHanzo Dev 9cfc3af66d the Go client for Hanzo Runtime
Generated from Runtime's OpenAPI document, and pure standard library — it
requires nothing else, so a caller pays only for this package.

It lives here rather than inside Runtime because a nested module is resolved
by the path it declares, and one declaring a path it does not sit at is
reachable by nobody: no proxy answers for it and no consumer can name it.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-14 08:41:09 -07:00

198 lines
4.7 KiB
Go

/*
Runtime
Runtime AI platform API Docs
API version: 1.0
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package apiclient
import (
"encoding/json"
)
// checks if the ReplaceResult type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ReplaceResult{}
// ReplaceResult struct for ReplaceResult
type ReplaceResult struct {
File *string `json:"file,omitempty"`
Success *bool `json:"success,omitempty"`
Error *string `json:"error,omitempty"`
}
// NewReplaceResult instantiates a new ReplaceResult 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 NewReplaceResult() *ReplaceResult {
this := ReplaceResult{}
return &this
}
// NewReplaceResultWithDefaults instantiates a new ReplaceResult 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 NewReplaceResultWithDefaults() *ReplaceResult {
this := ReplaceResult{}
return &this
}
// GetFile returns the File field value if set, zero value otherwise.
func (o *ReplaceResult) GetFile() string {
if o == nil || IsNil(o.File) {
var ret string
return ret
}
return *o.File
}
// GetFileOk returns a tuple with the File field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReplaceResult) GetFileOk() (*string, bool) {
if o == nil || IsNil(o.File) {
return nil, false
}
return o.File, true
}
// HasFile returns a boolean if a field has been set.
func (o *ReplaceResult) HasFile() bool {
if o != nil && !IsNil(o.File) {
return true
}
return false
}
// SetFile gets a reference to the given string and assigns it to the File field.
func (o *ReplaceResult) SetFile(v string) {
o.File = &v
}
// GetSuccess returns the Success field value if set, zero value otherwise.
func (o *ReplaceResult) GetSuccess() bool {
if o == nil || IsNil(o.Success) {
var ret bool
return ret
}
return *o.Success
}
// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReplaceResult) GetSuccessOk() (*bool, bool) {
if o == nil || IsNil(o.Success) {
return nil, false
}
return o.Success, true
}
// HasSuccess returns a boolean if a field has been set.
func (o *ReplaceResult) HasSuccess() bool {
if o != nil && !IsNil(o.Success) {
return true
}
return false
}
// SetSuccess gets a reference to the given bool and assigns it to the Success field.
func (o *ReplaceResult) SetSuccess(v bool) {
o.Success = &v
}
// GetError returns the Error field value if set, zero value otherwise.
func (o *ReplaceResult) GetError() string {
if o == nil || IsNil(o.Error) {
var ret string
return ret
}
return *o.Error
}
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReplaceResult) GetErrorOk() (*string, bool) {
if o == nil || IsNil(o.Error) {
return nil, false
}
return o.Error, true
}
// HasError returns a boolean if a field has been set.
func (o *ReplaceResult) HasError() bool {
if o != nil && !IsNil(o.Error) {
return true
}
return false
}
// SetError gets a reference to the given string and assigns it to the Error field.
func (o *ReplaceResult) SetError(v string) {
o.Error = &v
}
func (o ReplaceResult) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ReplaceResult) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.File) {
toSerialize["file"] = o.File
}
if !IsNil(o.Success) {
toSerialize["success"] = o.Success
}
if !IsNil(o.Error) {
toSerialize["error"] = o.Error
}
return toSerialize, nil
}
type NullableReplaceResult struct {
value *ReplaceResult
isSet bool
}
func (v NullableReplaceResult) Get() *ReplaceResult {
return v.value
}
func (v *NullableReplaceResult) Set(val *ReplaceResult) {
v.value = val
v.isSet = true
}
func (v NullableReplaceResult) IsSet() bool {
return v.isSet
}
func (v *NullableReplaceResult) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableReplaceResult(val *ReplaceResult) *NullableReplaceResult {
return &NullableReplaceResult{value: val, isSet: true}
}
func (v NullableReplaceResult) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableReplaceResult) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}