Files
opencloud/vendor/github.com/opencloud-eu/libre-graph-api-go/model_search_response.go
T
Dominik Schmidt 2a00f7c34a chore: bump libre-graph-api-go to v1.0.8
First tagged release carrying the merged search spec: the search query
endpoint with aggregations (metricDefinition/searchMetric,
geohashDefinition, aggregationFilterToken), sortProperty and the
auth-guest additions.
2026-10-02 12:48:21 +02:00

165 lines
4.6 KiB
Go

/*
Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.8
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package libregraph
import (
"encoding/json"
)
// checks if the SearchResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SearchResponse{}
// SearchResponse Represents the response for an individual search request. Follows the [MS Graph searchResponse](https://learn.microsoft.com/en-us/graph/api/resources/searchresponse) resource type.
type SearchResponse struct {
// Contains the search terms sent in the initial search query.
SearchTerms []string `json:"searchTerms,omitempty"`
// A collection of search result sets. One for each entity type that was queried.
HitsContainers []SearchHitsContainer `json:"hitsContainers,omitempty"`
}
// NewSearchResponse instantiates a new SearchResponse 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 NewSearchResponse() *SearchResponse {
this := SearchResponse{}
return &this
}
// NewSearchResponseWithDefaults instantiates a new SearchResponse 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 NewSearchResponseWithDefaults() *SearchResponse {
this := SearchResponse{}
return &this
}
// GetSearchTerms returns the SearchTerms field value if set, zero value otherwise.
func (o *SearchResponse) GetSearchTerms() []string {
if o == nil || IsNil(o.SearchTerms) {
var ret []string
return ret
}
return o.SearchTerms
}
// GetSearchTermsOk returns a tuple with the SearchTerms field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponse) GetSearchTermsOk() ([]string, bool) {
if o == nil || IsNil(o.SearchTerms) {
return nil, false
}
return o.SearchTerms, true
}
// HasSearchTerms returns a boolean if a field has been set.
func (o *SearchResponse) HasSearchTerms() bool {
if o != nil && !IsNil(o.SearchTerms) {
return true
}
return false
}
// SetSearchTerms gets a reference to the given []string and assigns it to the SearchTerms field.
func (o *SearchResponse) SetSearchTerms(v []string) {
o.SearchTerms = v
}
// GetHitsContainers returns the HitsContainers field value if set, zero value otherwise.
func (o *SearchResponse) GetHitsContainers() []SearchHitsContainer {
if o == nil || IsNil(o.HitsContainers) {
var ret []SearchHitsContainer
return ret
}
return o.HitsContainers
}
// GetHitsContainersOk returns a tuple with the HitsContainers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponse) GetHitsContainersOk() ([]SearchHitsContainer, bool) {
if o == nil || IsNil(o.HitsContainers) {
return nil, false
}
return o.HitsContainers, true
}
// HasHitsContainers returns a boolean if a field has been set.
func (o *SearchResponse) HasHitsContainers() bool {
if o != nil && !IsNil(o.HitsContainers) {
return true
}
return false
}
// SetHitsContainers gets a reference to the given []SearchHitsContainer and assigns it to the HitsContainers field.
func (o *SearchResponse) SetHitsContainers(v []SearchHitsContainer) {
o.HitsContainers = v
}
func (o SearchResponse) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SearchResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.SearchTerms) {
toSerialize["searchTerms"] = o.SearchTerms
}
if !IsNil(o.HitsContainers) {
toSerialize["hitsContainers"] = o.HitsContainers
}
return toSerialize, nil
}
type NullableSearchResponse struct {
value *SearchResponse
isSet bool
}
func (v NullableSearchResponse) Get() *SearchResponse {
return v.value
}
func (v *NullableSearchResponse) Set(val *SearchResponse) {
v.value = val
v.isSet = true
}
func (v NullableSearchResponse) IsSet() bool {
return v.isSet
}
func (v *NullableSearchResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSearchResponse(val *SearchResponse) *NullableSearchResponse {
return &NullableSearchResponse{value: val, isSet: true}
}
func (v NullableSearchResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSearchResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}