Files
sdk/model_graph_graph_kinship_score.go

231 lines
6.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 GraphGraphKinshipScore type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphKinshipScore{}
// GraphGraphKinshipScore struct for GraphGraphKinshipScore
type GraphGraphKinshipScore struct {
// Assertion is the underlying scorecard assertion holding at the point.
Assertion *GraphWireFact `json:"assertion,omitempty"`
// Relationship is the scorecard column, such as mother, father, partner, family or familyAndFriends.
Relationship *string `json:"relationship,omitempty"`
// Score is the classifier probability in [0,1].
Score *float64 `json:"score,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphKinshipScore GraphGraphKinshipScore
// NewGraphGraphKinshipScore instantiates a new GraphGraphKinshipScore 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 NewGraphGraphKinshipScore() *GraphGraphKinshipScore {
this := GraphGraphKinshipScore{}
return &this
}
// NewGraphGraphKinshipScoreWithDefaults instantiates a new GraphGraphKinshipScore 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 NewGraphGraphKinshipScoreWithDefaults() *GraphGraphKinshipScore {
this := GraphGraphKinshipScore{}
return &this
}
// GetAssertion returns the Assertion field value if set, zero value otherwise.
func (o *GraphGraphKinshipScore) GetAssertion() GraphWireFact {
if o == nil || IsNil(o.Assertion) {
var ret GraphWireFact
return ret
}
return *o.Assertion
}
// GetAssertionOk returns a tuple with the Assertion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphKinshipScore) GetAssertionOk() (*GraphWireFact, bool) {
if o == nil || IsNil(o.Assertion) {
return nil, false
}
return o.Assertion, true
}
// HasAssertion returns a boolean if a field has been set.
func (o *GraphGraphKinshipScore) HasAssertion() bool {
if o != nil && !IsNil(o.Assertion) {
return true
}
return false
}
// SetAssertion gets a reference to the given GraphWireFact and assigns it to the Assertion field.
func (o *GraphGraphKinshipScore) SetAssertion(v GraphWireFact) {
o.Assertion = &v
}
// GetRelationship returns the Relationship field value if set, zero value otherwise.
func (o *GraphGraphKinshipScore) GetRelationship() string {
if o == nil || IsNil(o.Relationship) {
var ret string
return ret
}
return *o.Relationship
}
// GetRelationshipOk returns a tuple with the Relationship field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphKinshipScore) GetRelationshipOk() (*string, bool) {
if o == nil || IsNil(o.Relationship) {
return nil, false
}
return o.Relationship, true
}
// HasRelationship returns a boolean if a field has been set.
func (o *GraphGraphKinshipScore) HasRelationship() bool {
if o != nil && !IsNil(o.Relationship) {
return true
}
return false
}
// SetRelationship gets a reference to the given string and assigns it to the Relationship field.
func (o *GraphGraphKinshipScore) SetRelationship(v string) {
o.Relationship = &v
}
// GetScore returns the Score field value if set, zero value otherwise.
func (o *GraphGraphKinshipScore) GetScore() float64 {
if o == nil || IsNil(o.Score) {
var ret float64
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 *GraphGraphKinshipScore) GetScoreOk() (*float64, 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 *GraphGraphKinshipScore) HasScore() bool {
if o != nil && !IsNil(o.Score) {
return true
}
return false
}
// SetScore gets a reference to the given float64 and assigns it to the Score field.
func (o *GraphGraphKinshipScore) SetScore(v float64) {
o.Score = &v
}
func (o GraphGraphKinshipScore) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphKinshipScore) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Assertion) {
toSerialize["assertion"] = o.Assertion
}
if !IsNil(o.Relationship) {
toSerialize["relationship"] = o.Relationship
}
if !IsNil(o.Score) {
toSerialize["score"] = o.Score
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GraphGraphKinshipScore) UnmarshalJSON(data []byte) (err error) {
varGraphGraphKinshipScore := _GraphGraphKinshipScore{}
err = json.Unmarshal(data, &varGraphGraphKinshipScore)
if err != nil {
return err
}
*o = GraphGraphKinshipScore(varGraphGraphKinshipScore)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "assertion")
delete(additionalProperties, "relationship")
delete(additionalProperties, "score")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphKinshipScore struct {
value *GraphGraphKinshipScore
isSet bool
}
func (v NullableGraphGraphKinshipScore) Get() *GraphGraphKinshipScore {
return v.value
}
func (v *NullableGraphGraphKinshipScore) Set(val *GraphGraphKinshipScore) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphKinshipScore) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphKinshipScore) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphKinshipScore(val *GraphGraphKinshipScore) *NullableGraphGraphKinshipScore {
return &NullableGraphGraphKinshipScore{value: val, isSet: true}
}
func (v NullableGraphGraphKinshipScore) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphKinshipScore) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}