mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.2 KiB
Go
269 lines
7.2 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 GraphGraphFinding type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphFinding{}
|
|
|
|
// GraphGraphFinding struct for GraphGraphFinding
|
|
type GraphGraphFinding struct {
|
|
// Assertions are the IDs of the assertions it cites, each a row a read of this graph returns.
|
|
Assertions []string `json:"assertions,omitempty"`
|
|
// Communities are the communities of the facts it cites, at level 0 of the partition at AsOf — the ids POST /v1/graph/communities answers with.
|
|
Communities []int64 `json:"communities,omitempty"`
|
|
// Score is how much the model judged it helps, 1 to 100.
|
|
Score *int64 `json:"score,omitempty"`
|
|
// Text is what the model found, in its words.
|
|
Text *string `json:"text,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphFinding GraphGraphFinding
|
|
|
|
// NewGraphGraphFinding instantiates a new GraphGraphFinding 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 NewGraphGraphFinding() *GraphGraphFinding {
|
|
this := GraphGraphFinding{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphFindingWithDefaults instantiates a new GraphGraphFinding 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 NewGraphGraphFindingWithDefaults() *GraphGraphFinding {
|
|
this := GraphGraphFinding{}
|
|
return &this
|
|
}
|
|
|
|
// GetAssertions returns the Assertions field value if set, zero value otherwise.
|
|
func (o *GraphGraphFinding) GetAssertions() []string {
|
|
if o == nil || IsNil(o.Assertions) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Assertions
|
|
}
|
|
|
|
// GetAssertionsOk returns a tuple with the Assertions field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphFinding) GetAssertionsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Assertions) {
|
|
return nil, false
|
|
}
|
|
return o.Assertions, true
|
|
}
|
|
|
|
// HasAssertions returns a boolean if a field has been set.
|
|
func (o *GraphGraphFinding) HasAssertions() bool {
|
|
if o != nil && !IsNil(o.Assertions) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAssertions gets a reference to the given []string and assigns it to the Assertions field.
|
|
func (o *GraphGraphFinding) SetAssertions(v []string) {
|
|
o.Assertions = v
|
|
}
|
|
|
|
// GetCommunities returns the Communities field value if set, zero value otherwise.
|
|
func (o *GraphGraphFinding) GetCommunities() []int64 {
|
|
if o == nil || IsNil(o.Communities) {
|
|
var ret []int64
|
|
return ret
|
|
}
|
|
return o.Communities
|
|
}
|
|
|
|
// GetCommunitiesOk returns a tuple with the Communities field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphFinding) GetCommunitiesOk() ([]int64, bool) {
|
|
if o == nil || IsNil(o.Communities) {
|
|
return nil, false
|
|
}
|
|
return o.Communities, true
|
|
}
|
|
|
|
// HasCommunities returns a boolean if a field has been set.
|
|
func (o *GraphGraphFinding) HasCommunities() bool {
|
|
if o != nil && !IsNil(o.Communities) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCommunities gets a reference to the given []int64 and assigns it to the Communities field.
|
|
func (o *GraphGraphFinding) SetCommunities(v []int64) {
|
|
o.Communities = v
|
|
}
|
|
|
|
// GetScore returns the Score field value if set, zero value otherwise.
|
|
func (o *GraphGraphFinding) GetScore() int64 {
|
|
if o == nil || IsNil(o.Score) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Score
|
|
}
|
|
|
|
// GetScoreOk returns a tuple with the Score field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphFinding) GetScoreOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Score) {
|
|
return nil, false
|
|
}
|
|
return o.Score, true
|
|
}
|
|
|
|
// HasScore returns a boolean if a field has been set.
|
|
func (o *GraphGraphFinding) HasScore() bool {
|
|
if o != nil && !IsNil(o.Score) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScore gets a reference to the given int64 and assigns it to the Score field.
|
|
func (o *GraphGraphFinding) SetScore(v int64) {
|
|
o.Score = &v
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise.
|
|
func (o *GraphGraphFinding) GetText() string {
|
|
if o == nil || IsNil(o.Text) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Text
|
|
}
|
|
|
|
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphFinding) GetTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Text) {
|
|
return nil, false
|
|
}
|
|
return o.Text, true
|
|
}
|
|
|
|
// HasText returns a boolean if a field has been set.
|
|
func (o *GraphGraphFinding) HasText() bool {
|
|
if o != nil && !IsNil(o.Text) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetText gets a reference to the given string and assigns it to the Text field.
|
|
func (o *GraphGraphFinding) SetText(v string) {
|
|
o.Text = &v
|
|
}
|
|
|
|
func (o GraphGraphFinding) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphFinding) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Assertions) {
|
|
toSerialize["assertions"] = o.Assertions
|
|
}
|
|
if !IsNil(o.Communities) {
|
|
toSerialize["communities"] = o.Communities
|
|
}
|
|
if !IsNil(o.Score) {
|
|
toSerialize["score"] = o.Score
|
|
}
|
|
if !IsNil(o.Text) {
|
|
toSerialize["text"] = o.Text
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphFinding) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphFinding := _GraphGraphFinding{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphFinding)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphFinding(varGraphGraphFinding)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "assertions")
|
|
delete(additionalProperties, "communities")
|
|
delete(additionalProperties, "score")
|
|
delete(additionalProperties, "text")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphFinding struct {
|
|
value *GraphGraphFinding
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphFinding) Get() *GraphGraphFinding {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphFinding) Set(val *GraphGraphFinding) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphFinding) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphFinding) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphFinding(val *GraphGraphFinding) *NullableGraphGraphFinding {
|
|
return &NullableGraphGraphFinding{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphFinding) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphFinding) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|