Files
openapi-go-answer/model_schema_search_resp.go
2023-09-26 16:20:01 +08:00

162 lines
4.0 KiB
Go

/*
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package answer_sdk
import (
"encoding/json"
)
// checks if the SchemaSearchResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaSearchResp{}
// SchemaSearchResp struct for SchemaSearchResp
type SchemaSearchResp struct {
Count *int32 `json:"count,omitempty"`
// search response
List []SchemaSearchResult `json:"list,omitempty"`
}
// NewSchemaSearchResp instantiates a new SchemaSearchResp 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 NewSchemaSearchResp() *SchemaSearchResp {
this := SchemaSearchResp{}
return &this
}
// NewSchemaSearchRespWithDefaults instantiates a new SchemaSearchResp 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 NewSchemaSearchRespWithDefaults() *SchemaSearchResp {
this := SchemaSearchResp{}
return &this
}
// GetCount returns the Count field value if set, zero value otherwise.
func (o *SchemaSearchResp) GetCount() int32 {
if o == nil || IsNil(o.Count) {
var ret int32
return ret
}
return *o.Count
}
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSearchResp) GetCountOk() (*int32, bool) {
if o == nil || IsNil(o.Count) {
return nil, false
}
return o.Count, true
}
// HasCount returns a boolean if a field has been set.
func (o *SchemaSearchResp) HasCount() bool {
if o != nil && !IsNil(o.Count) {
return true
}
return false
}
// SetCount gets a reference to the given int32 and assigns it to the Count field.
func (o *SchemaSearchResp) SetCount(v int32) {
o.Count = &v
}
// GetList returns the List field value if set, zero value otherwise.
func (o *SchemaSearchResp) GetList() []SchemaSearchResult {
if o == nil || IsNil(o.List) {
var ret []SchemaSearchResult
return ret
}
return o.List
}
// GetListOk returns a tuple with the List field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSearchResp) GetListOk() ([]SchemaSearchResult, bool) {
if o == nil || IsNil(o.List) {
return nil, false
}
return o.List, true
}
// HasList returns a boolean if a field has been set.
func (o *SchemaSearchResp) HasList() bool {
if o != nil && !IsNil(o.List) {
return true
}
return false
}
// SetList gets a reference to the given []SchemaSearchResult and assigns it to the List field.
func (o *SchemaSearchResp) SetList(v []SchemaSearchResult) {
o.List = v
}
func (o SchemaSearchResp) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaSearchResp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Count) {
toSerialize["count"] = o.Count
}
if !IsNil(o.List) {
toSerialize["list"] = o.List
}
return toSerialize, nil
}
type NullableSchemaSearchResp struct {
value *SchemaSearchResp
isSet bool
}
func (v NullableSchemaSearchResp) Get() *SchemaSearchResp {
return v.value
}
func (v *NullableSchemaSearchResp) Set(val *SchemaSearchResp) {
v.value = val
v.isSet = true
}
func (v NullableSchemaSearchResp) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaSearchResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaSearchResp(val *SchemaSearchResp) *NullableSchemaSearchResp {
return &NullableSchemaSearchResp{value: val, isSet: true}
}
func (v NullableSchemaSearchResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaSearchResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}