Files
sdk/model_frame.go

265 lines
6.1 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 Frame type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Frame{}
// Frame struct for Frame
type Frame struct {
Column *int32 `json:"column,omitempty"`
File *string `json:"file,omitempty"`
Function *string `json:"function,omitempty"`
Line *int32 `json:"line,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Frame Frame
// NewFrame instantiates a new Frame 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 NewFrame() *Frame {
this := Frame{}
return &this
}
// NewFrameWithDefaults instantiates a new Frame 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 NewFrameWithDefaults() *Frame {
this := Frame{}
return &this
}
// GetColumn returns the Column field value if set, zero value otherwise.
func (o *Frame) GetColumn() int32 {
if o == nil || IsNil(o.Column) {
var ret int32
return ret
}
return *o.Column
}
// GetColumnOk returns a tuple with the Column field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Frame) GetColumnOk() (*int32, bool) {
if o == nil || IsNil(o.Column) {
return nil, false
}
return o.Column, true
}
// HasColumn returns a boolean if a field has been set.
func (o *Frame) HasColumn() bool {
if o != nil && !IsNil(o.Column) {
return true
}
return false
}
// SetColumn gets a reference to the given int32 and assigns it to the Column field.
func (o *Frame) SetColumn(v int32) {
o.Column = &v
}
// GetFile returns the File field value if set, zero value otherwise.
func (o *Frame) 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 *Frame) 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 *Frame) 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 *Frame) SetFile(v string) {
o.File = &v
}
// GetFunction returns the Function field value if set, zero value otherwise.
func (o *Frame) GetFunction() string {
if o == nil || IsNil(o.Function) {
var ret string
return ret
}
return *o.Function
}
// GetFunctionOk returns a tuple with the Function field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Frame) GetFunctionOk() (*string, bool) {
if o == nil || IsNil(o.Function) {
return nil, false
}
return o.Function, true
}
// HasFunction returns a boolean if a field has been set.
func (o *Frame) HasFunction() bool {
if o != nil && !IsNil(o.Function) {
return true
}
return false
}
// SetFunction gets a reference to the given string and assigns it to the Function field.
func (o *Frame) SetFunction(v string) {
o.Function = &v
}
// GetLine returns the Line field value if set, zero value otherwise.
func (o *Frame) GetLine() int32 {
if o == nil || IsNil(o.Line) {
var ret int32
return ret
}
return *o.Line
}
// GetLineOk returns a tuple with the Line field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Frame) GetLineOk() (*int32, bool) {
if o == nil || IsNil(o.Line) {
return nil, false
}
return o.Line, true
}
// HasLine returns a boolean if a field has been set.
func (o *Frame) HasLine() bool {
if o != nil && !IsNil(o.Line) {
return true
}
return false
}
// SetLine gets a reference to the given int32 and assigns it to the Line field.
func (o *Frame) SetLine(v int32) {
o.Line = &v
}
func (o Frame) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Frame) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Column) {
toSerialize["column"] = o.Column
}
if !IsNil(o.File) {
toSerialize["file"] = o.File
}
if !IsNil(o.Function) {
toSerialize["function"] = o.Function
}
if !IsNil(o.Line) {
toSerialize["line"] = o.Line
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *Frame) UnmarshalJSON(data []byte) (err error) {
varFrame := _Frame{}
err = json.Unmarshal(data, &varFrame)
if err != nil {
return err
}
*o = Frame(varFrame)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "column")
delete(additionalProperties, "file")
delete(additionalProperties, "function")
delete(additionalProperties, "line")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFrame struct {
value *Frame
isSet bool
}
func (v NullableFrame) Get() *Frame {
return v.value
}
func (v *NullableFrame) Set(val *Frame) {
v.value = val
v.isSet = true
}
func (v NullableFrame) IsSet() bool {
return v.isSet
}
func (v *NullableFrame) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFrame(val *Frame) *NullableFrame {
return &NullableFrame{value: val, isSet: true}
}
func (v NullableFrame) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFrame) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}