Files
sdk/model_lsp_completion.go

231 lines
5.8 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 LspCompletion type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LspCompletion{}
// LspCompletion struct for LspCompletion
type LspCompletion struct {
// Detail is the server's short elaboration, typically the type or signature.
Detail *string `json:"detail,omitempty"`
// Kind is the LSP CompletionItemKind number (2 method, 3 function, 5 field, 6 variable, …), passed through as the protocol spells it.
Kind *int64 `json:"kind,omitempty"`
// Label is the text a client would insert, and what an editor lists.
Label *string `json:"label,omitempty"`
AdditionalProperties map[string]interface{}
}
type _LspCompletion LspCompletion
// NewLspCompletion instantiates a new LspCompletion 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 NewLspCompletion() *LspCompletion {
this := LspCompletion{}
return &this
}
// NewLspCompletionWithDefaults instantiates a new LspCompletion 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 NewLspCompletionWithDefaults() *LspCompletion {
this := LspCompletion{}
return &this
}
// GetDetail returns the Detail field value if set, zero value otherwise.
func (o *LspCompletion) GetDetail() string {
if o == nil || IsNil(o.Detail) {
var ret string
return ret
}
return *o.Detail
}
// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LspCompletion) GetDetailOk() (*string, bool) {
if o == nil || IsNil(o.Detail) {
return nil, false
}
return o.Detail, true
}
// HasDetail returns a boolean if a field has been set.
func (o *LspCompletion) HasDetail() bool {
if o != nil && !IsNil(o.Detail) {
return true
}
return false
}
// SetDetail gets a reference to the given string and assigns it to the Detail field.
func (o *LspCompletion) SetDetail(v string) {
o.Detail = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *LspCompletion) GetKind() int64 {
if o == nil || IsNil(o.Kind) {
var ret int64
return ret
}
return *o.Kind
}
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LspCompletion) GetKindOk() (*int64, bool) {
if o == nil || IsNil(o.Kind) {
return nil, false
}
return o.Kind, true
}
// HasKind returns a boolean if a field has been set.
func (o *LspCompletion) HasKind() bool {
if o != nil && !IsNil(o.Kind) {
return true
}
return false
}
// SetKind gets a reference to the given int64 and assigns it to the Kind field.
func (o *LspCompletion) SetKind(v int64) {
o.Kind = &v
}
// GetLabel returns the Label field value if set, zero value otherwise.
func (o *LspCompletion) GetLabel() string {
if o == nil || IsNil(o.Label) {
var ret string
return ret
}
return *o.Label
}
// GetLabelOk returns a tuple with the Label field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LspCompletion) GetLabelOk() (*string, bool) {
if o == nil || IsNil(o.Label) {
return nil, false
}
return o.Label, true
}
// HasLabel returns a boolean if a field has been set.
func (o *LspCompletion) HasLabel() bool {
if o != nil && !IsNil(o.Label) {
return true
}
return false
}
// SetLabel gets a reference to the given string and assigns it to the Label field.
func (o *LspCompletion) SetLabel(v string) {
o.Label = &v
}
func (o LspCompletion) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LspCompletion) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Detail) {
toSerialize["detail"] = o.Detail
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Label) {
toSerialize["label"] = o.Label
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *LspCompletion) UnmarshalJSON(data []byte) (err error) {
varLspCompletion := _LspCompletion{}
err = json.Unmarshal(data, &varLspCompletion)
if err != nil {
return err
}
*o = LspCompletion(varLspCompletion)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "detail")
delete(additionalProperties, "kind")
delete(additionalProperties, "label")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLspCompletion struct {
value *LspCompletion
isSet bool
}
func (v NullableLspCompletion) Get() *LspCompletion {
return v.value
}
func (v *NullableLspCompletion) Set(val *LspCompletion) {
v.value = val
v.isSet = true
}
func (v NullableLspCompletion) IsSet() bool {
return v.isSet
}
func (v *NullableLspCompletion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLspCompletion(val *LspCompletion) *NullableLspCompletion {
return &NullableLspCompletion{value: val, isSet: true}
}
func (v NullableLspCompletion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLspCompletion) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}