- Update version to 0.5.0 in all components - Regenerate OpenAPI spec and client SDKs - Python packages: hindsight-api, hindsight-dev, hindsight-all, hindsight-embed - Python client: hindsight-clients/python - TypeScript client: hindsight-clients/typescript - Rust CLI: hindsight-cli - Control Plane: hindsight-control-plane - Helm chart - Create documentation version-0.5
143 lines
3.3 KiB
Go
143 lines
3.3 KiB
Go
/*
|
|
Hindsight HTTP API
|
|
|
|
HTTP API for Hindsight
|
|
|
|
API version: 0.5.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hindsight
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
)
|
|
|
|
|
|
// Not1 struct for Not1
|
|
type Not1 struct {
|
|
TagGroupAndOutput *TagGroupAndOutput
|
|
TagGroupLeaf *TagGroupLeaf
|
|
TagGroupNotOutput *TagGroupNotOutput
|
|
TagGroupOrOutput *TagGroupOrOutput
|
|
}
|
|
|
|
// Unmarshal JSON data into any of the pointers in the struct
|
|
func (dst *Not1) UnmarshalJSON(data []byte) error {
|
|
var err error
|
|
// try to unmarshal JSON data into TagGroupAndOutput
|
|
err = json.Unmarshal(data, &dst.TagGroupAndOutput);
|
|
if err == nil {
|
|
jsonTagGroupAndOutput, _ := json.Marshal(dst.TagGroupAndOutput)
|
|
if string(jsonTagGroupAndOutput) == "{}" { // empty struct
|
|
dst.TagGroupAndOutput = nil
|
|
} else {
|
|
return nil // data stored in dst.TagGroupAndOutput, return on the first match
|
|
}
|
|
} else {
|
|
dst.TagGroupAndOutput = nil
|
|
}
|
|
|
|
// try to unmarshal JSON data into TagGroupLeaf
|
|
err = json.Unmarshal(data, &dst.TagGroupLeaf);
|
|
if err == nil {
|
|
jsonTagGroupLeaf, _ := json.Marshal(dst.TagGroupLeaf)
|
|
if string(jsonTagGroupLeaf) == "{}" { // empty struct
|
|
dst.TagGroupLeaf = nil
|
|
} else {
|
|
return nil // data stored in dst.TagGroupLeaf, return on the first match
|
|
}
|
|
} else {
|
|
dst.TagGroupLeaf = nil
|
|
}
|
|
|
|
// try to unmarshal JSON data into TagGroupNotOutput
|
|
err = json.Unmarshal(data, &dst.TagGroupNotOutput);
|
|
if err == nil {
|
|
jsonTagGroupNotOutput, _ := json.Marshal(dst.TagGroupNotOutput)
|
|
if string(jsonTagGroupNotOutput) == "{}" { // empty struct
|
|
dst.TagGroupNotOutput = nil
|
|
} else {
|
|
return nil // data stored in dst.TagGroupNotOutput, return on the first match
|
|
}
|
|
} else {
|
|
dst.TagGroupNotOutput = nil
|
|
}
|
|
|
|
// try to unmarshal JSON data into TagGroupOrOutput
|
|
err = json.Unmarshal(data, &dst.TagGroupOrOutput);
|
|
if err == nil {
|
|
jsonTagGroupOrOutput, _ := json.Marshal(dst.TagGroupOrOutput)
|
|
if string(jsonTagGroupOrOutput) == "{}" { // empty struct
|
|
dst.TagGroupOrOutput = nil
|
|
} else {
|
|
return nil // data stored in dst.TagGroupOrOutput, return on the first match
|
|
}
|
|
} else {
|
|
dst.TagGroupOrOutput = nil
|
|
}
|
|
|
|
return fmt.Errorf("data failed to match schemas in anyOf(Not1)")
|
|
}
|
|
|
|
// Marshal data from the first non-nil pointers in the struct to JSON
|
|
func (src *Not1) MarshalJSON() ([]byte, error) {
|
|
if src.TagGroupAndOutput != nil {
|
|
return json.Marshal(&src.TagGroupAndOutput)
|
|
}
|
|
|
|
if src.TagGroupLeaf != nil {
|
|
return json.Marshal(&src.TagGroupLeaf)
|
|
}
|
|
|
|
if src.TagGroupNotOutput != nil {
|
|
return json.Marshal(&src.TagGroupNotOutput)
|
|
}
|
|
|
|
if src.TagGroupOrOutput != nil {
|
|
return json.Marshal(&src.TagGroupOrOutput)
|
|
}
|
|
|
|
return nil, nil // no data in anyOf schemas
|
|
}
|
|
|
|
|
|
type NullableNot1 struct {
|
|
value *Not1
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableNot1) Get() *Not1 {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableNot1) Set(val *Not1) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableNot1) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableNot1) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableNot1(val *Not1) *NullableNot1 {
|
|
return &NullableNot1{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableNot1) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableNot1) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|