mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-10-31 20:41:22 +00:00
116 lines
2.9 KiB
Go
116 lines
2.9 KiB
Go
|
/*
|
||
|
* peridot/proto/v1/batch.proto
|
||
|
*
|
||
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||
|
*
|
||
|
* API version: version not set
|
||
|
*/
|
||
|
|
||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||
|
|
||
|
package peridotopenapi
|
||
|
|
||
|
import (
|
||
|
"encoding/json"
|
||
|
)
|
||
|
|
||
|
// V1SearchResponse struct for V1SearchResponse
|
||
|
type V1SearchResponse struct {
|
||
|
Hits *[]ProtobufAny `json:"hits,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewV1SearchResponse instantiates a new V1SearchResponse 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 NewV1SearchResponse() *V1SearchResponse {
|
||
|
this := V1SearchResponse{}
|
||
|
return &this
|
||
|
}
|
||
|
|
||
|
// NewV1SearchResponseWithDefaults instantiates a new V1SearchResponse 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 NewV1SearchResponseWithDefaults() *V1SearchResponse {
|
||
|
this := V1SearchResponse{}
|
||
|
return &this
|
||
|
}
|
||
|
|
||
|
// GetHits returns the Hits field value if set, zero value otherwise.
|
||
|
func (o *V1SearchResponse) GetHits() []ProtobufAny {
|
||
|
if o == nil || o.Hits == nil {
|
||
|
var ret []ProtobufAny
|
||
|
return ret
|
||
|
}
|
||
|
return *o.Hits
|
||
|
}
|
||
|
|
||
|
// GetHitsOk returns a tuple with the Hits field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1SearchResponse) GetHitsOk() (*[]ProtobufAny, bool) {
|
||
|
if o == nil || o.Hits == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Hits, true
|
||
|
}
|
||
|
|
||
|
// HasHits returns a boolean if a field has been set.
|
||
|
func (o *V1SearchResponse) HasHits() bool {
|
||
|
if o != nil && o.Hits != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetHits gets a reference to the given []ProtobufAny and assigns it to the Hits field.
|
||
|
func (o *V1SearchResponse) SetHits(v []ProtobufAny) {
|
||
|
o.Hits = &v
|
||
|
}
|
||
|
|
||
|
func (o V1SearchResponse) MarshalJSON() ([]byte, error) {
|
||
|
toSerialize := map[string]interface{}{}
|
||
|
if o.Hits != nil {
|
||
|
toSerialize["hits"] = o.Hits
|
||
|
}
|
||
|
return json.Marshal(toSerialize)
|
||
|
}
|
||
|
|
||
|
type NullableV1SearchResponse struct {
|
||
|
value *V1SearchResponse
|
||
|
isSet bool
|
||
|
}
|
||
|
|
||
|
func (v NullableV1SearchResponse) Get() *V1SearchResponse {
|
||
|
return v.value
|
||
|
}
|
||
|
|
||
|
func (v *NullableV1SearchResponse) Set(val *V1SearchResponse) {
|
||
|
v.value = val
|
||
|
v.isSet = true
|
||
|
}
|
||
|
|
||
|
func (v NullableV1SearchResponse) IsSet() bool {
|
||
|
return v.isSet
|
||
|
}
|
||
|
|
||
|
func (v *NullableV1SearchResponse) Unset() {
|
||
|
v.value = nil
|
||
|
v.isSet = false
|
||
|
}
|
||
|
|
||
|
func NewNullableV1SearchResponse(val *V1SearchResponse) *NullableV1SearchResponse {
|
||
|
return &NullableV1SearchResponse{value: val, isSet: true}
|
||
|
}
|
||
|
|
||
|
func (v NullableV1SearchResponse) MarshalJSON() ([]byte, error) {
|
||
|
return json.Marshal(v.value)
|
||
|
}
|
||
|
|
||
|
func (v *NullableV1SearchResponse) UnmarshalJSON(src []byte) error {
|
||
|
v.isSet = true
|
||
|
return json.Unmarshal(src, &v.value)
|
||
|
}
|
||
|
|
||
|
|