Files
sdk/model_graph_graph_extract_out.go

193 lines
5.5 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 GraphGraphExtractOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphExtractOut{}
// GraphGraphExtractOut struct for GraphGraphExtractOut
type GraphGraphExtractOut struct {
// Refused are the relations found that filing would refuse — a subject or object whose type is not the relation's declared domain or range, or a declaration from a caller who is not an admin — each carrying its reason. Ingest records none of them.
Refused []GraphGraphTriple `json:"refused,omitempty"`
// Triples are the relations found that the caller may file, in the order the document states them.
Triples []GraphGraphTriple `json:"triples,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphExtractOut GraphGraphExtractOut
// NewGraphGraphExtractOut instantiates a new GraphGraphExtractOut 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 NewGraphGraphExtractOut() *GraphGraphExtractOut {
this := GraphGraphExtractOut{}
return &this
}
// NewGraphGraphExtractOutWithDefaults instantiates a new GraphGraphExtractOut 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 NewGraphGraphExtractOutWithDefaults() *GraphGraphExtractOut {
this := GraphGraphExtractOut{}
return &this
}
// GetRefused returns the Refused field value if set, zero value otherwise.
func (o *GraphGraphExtractOut) GetRefused() []GraphGraphTriple {
if o == nil || IsNil(o.Refused) {
var ret []GraphGraphTriple
return ret
}
return o.Refused
}
// GetRefusedOk returns a tuple with the Refused field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphExtractOut) GetRefusedOk() ([]GraphGraphTriple, bool) {
if o == nil || IsNil(o.Refused) {
return nil, false
}
return o.Refused, true
}
// HasRefused returns a boolean if a field has been set.
func (o *GraphGraphExtractOut) HasRefused() bool {
if o != nil && !IsNil(o.Refused) {
return true
}
return false
}
// SetRefused gets a reference to the given []GraphGraphTriple and assigns it to the Refused field.
func (o *GraphGraphExtractOut) SetRefused(v []GraphGraphTriple) {
o.Refused = v
}
// GetTriples returns the Triples field value if set, zero value otherwise.
func (o *GraphGraphExtractOut) GetTriples() []GraphGraphTriple {
if o == nil || IsNil(o.Triples) {
var ret []GraphGraphTriple
return ret
}
return o.Triples
}
// GetTriplesOk returns a tuple with the Triples field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphExtractOut) GetTriplesOk() ([]GraphGraphTriple, bool) {
if o == nil || IsNil(o.Triples) {
return nil, false
}
return o.Triples, true
}
// HasTriples returns a boolean if a field has been set.
func (o *GraphGraphExtractOut) HasTriples() bool {
if o != nil && !IsNil(o.Triples) {
return true
}
return false
}
// SetTriples gets a reference to the given []GraphGraphTriple and assigns it to the Triples field.
func (o *GraphGraphExtractOut) SetTriples(v []GraphGraphTriple) {
o.Triples = v
}
func (o GraphGraphExtractOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphExtractOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Refused) {
toSerialize["refused"] = o.Refused
}
if !IsNil(o.Triples) {
toSerialize["triples"] = o.Triples
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GraphGraphExtractOut) UnmarshalJSON(data []byte) (err error) {
varGraphGraphExtractOut := _GraphGraphExtractOut{}
err = json.Unmarshal(data, &varGraphGraphExtractOut)
if err != nil {
return err
}
*o = GraphGraphExtractOut(varGraphGraphExtractOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "refused")
delete(additionalProperties, "triples")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphExtractOut struct {
value *GraphGraphExtractOut
isSet bool
}
func (v NullableGraphGraphExtractOut) Get() *GraphGraphExtractOut {
return v.value
}
func (v *NullableGraphGraphExtractOut) Set(val *GraphGraphExtractOut) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphExtractOut) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphExtractOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphExtractOut(val *GraphGraphExtractOut) *NullableGraphGraphExtractOut {
return &NullableGraphGraphExtractOut{value: val, isSet: true}
}
func (v NullableGraphGraphExtractOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphExtractOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}