mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.7 KiB
Go
269 lines
7.7 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 GraphGraphCommunitiesIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphCommunitiesIn{}
|
|
|
|
// GraphGraphCommunitiesIn struct for GraphGraphCommunitiesIn
|
|
type GraphGraphCommunitiesIn struct {
|
|
// AsKnown is how much this plane had heard, RFC 3339: the answer as it would have been given then, which is what makes a past answer reproducible. Absent is now.
|
|
AsKnown *string `json:"as_known,omitempty"`
|
|
// AsOf partitions the graph as it stood at an instant of the world, RFC 3339: the edges that held then. Absent is now.
|
|
AsOf *string `json:"as_of,omitempty"`
|
|
// Level is how fine a partition to answer with. 0, the default, is the coarsest — the partition detection stops at, where modularity is highest — and each level above it is the pass before, finer. `levels` in the answer says how many there are.
|
|
Level *int64 `json:"level,omitempty"`
|
|
// Relation narrows the graph to one edge relation, by its key. Absent partitions every edge.
|
|
Relation *string `json:"relation,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphCommunitiesIn GraphGraphCommunitiesIn
|
|
|
|
// NewGraphGraphCommunitiesIn instantiates a new GraphGraphCommunitiesIn 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 NewGraphGraphCommunitiesIn() *GraphGraphCommunitiesIn {
|
|
this := GraphGraphCommunitiesIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphCommunitiesInWithDefaults instantiates a new GraphGraphCommunitiesIn 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 NewGraphGraphCommunitiesInWithDefaults() *GraphGraphCommunitiesIn {
|
|
this := GraphGraphCommunitiesIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetAsKnown returns the AsKnown field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesIn) GetAsKnown() string {
|
|
if o == nil || IsNil(o.AsKnown) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AsKnown
|
|
}
|
|
|
|
// GetAsKnownOk returns a tuple with the AsKnown field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesIn) GetAsKnownOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AsKnown) {
|
|
return nil, false
|
|
}
|
|
return o.AsKnown, true
|
|
}
|
|
|
|
// HasAsKnown returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesIn) HasAsKnown() bool {
|
|
if o != nil && !IsNil(o.AsKnown) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAsKnown gets a reference to the given string and assigns it to the AsKnown field.
|
|
func (o *GraphGraphCommunitiesIn) SetAsKnown(v string) {
|
|
o.AsKnown = &v
|
|
}
|
|
|
|
// GetAsOf returns the AsOf field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesIn) GetAsOf() string {
|
|
if o == nil || IsNil(o.AsOf) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AsOf
|
|
}
|
|
|
|
// GetAsOfOk returns a tuple with the AsOf field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesIn) GetAsOfOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AsOf) {
|
|
return nil, false
|
|
}
|
|
return o.AsOf, true
|
|
}
|
|
|
|
// HasAsOf returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesIn) HasAsOf() bool {
|
|
if o != nil && !IsNil(o.AsOf) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAsOf gets a reference to the given string and assigns it to the AsOf field.
|
|
func (o *GraphGraphCommunitiesIn) SetAsOf(v string) {
|
|
o.AsOf = &v
|
|
}
|
|
|
|
// GetLevel returns the Level field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesIn) GetLevel() int64 {
|
|
if o == nil || IsNil(o.Level) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Level
|
|
}
|
|
|
|
// GetLevelOk returns a tuple with the Level field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesIn) GetLevelOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Level) {
|
|
return nil, false
|
|
}
|
|
return o.Level, true
|
|
}
|
|
|
|
// HasLevel returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesIn) HasLevel() bool {
|
|
if o != nil && !IsNil(o.Level) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLevel gets a reference to the given int64 and assigns it to the Level field.
|
|
func (o *GraphGraphCommunitiesIn) SetLevel(v int64) {
|
|
o.Level = &v
|
|
}
|
|
|
|
// GetRelation returns the Relation field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesIn) GetRelation() string {
|
|
if o == nil || IsNil(o.Relation) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Relation
|
|
}
|
|
|
|
// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesIn) GetRelationOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Relation) {
|
|
return nil, false
|
|
}
|
|
return o.Relation, true
|
|
}
|
|
|
|
// HasRelation returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesIn) HasRelation() bool {
|
|
if o != nil && !IsNil(o.Relation) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRelation gets a reference to the given string and assigns it to the Relation field.
|
|
func (o *GraphGraphCommunitiesIn) SetRelation(v string) {
|
|
o.Relation = &v
|
|
}
|
|
|
|
func (o GraphGraphCommunitiesIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphCommunitiesIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AsKnown) {
|
|
toSerialize["as_known"] = o.AsKnown
|
|
}
|
|
if !IsNil(o.AsOf) {
|
|
toSerialize["as_of"] = o.AsOf
|
|
}
|
|
if !IsNil(o.Level) {
|
|
toSerialize["level"] = o.Level
|
|
}
|
|
if !IsNil(o.Relation) {
|
|
toSerialize["relation"] = o.Relation
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphCommunitiesIn) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphCommunitiesIn := _GraphGraphCommunitiesIn{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphCommunitiesIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphCommunitiesIn(varGraphGraphCommunitiesIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "as_known")
|
|
delete(additionalProperties, "as_of")
|
|
delete(additionalProperties, "level")
|
|
delete(additionalProperties, "relation")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphCommunitiesIn struct {
|
|
value *GraphGraphCommunitiesIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphCommunitiesIn) Get() *GraphGraphCommunitiesIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphCommunitiesIn) Set(val *GraphGraphCommunitiesIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphCommunitiesIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphCommunitiesIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphCommunitiesIn(val *GraphGraphCommunitiesIn) *NullableGraphGraphCommunitiesIn {
|
|
return &NullableGraphGraphCommunitiesIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphCommunitiesIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphCommunitiesIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|