mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
535 lines
15 KiB
Go
535 lines
15 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 GraphGraphCommunitiesOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphCommunitiesOut{}
|
|
|
|
// GraphGraphCommunitiesOut struct for GraphGraphCommunitiesOut
|
|
type GraphGraphCommunitiesOut struct {
|
|
// AsKnown is the knowledge instant it was taken at, RFC 3339, the same way.
|
|
AsKnown *string `json:"as_known,omitempty"`
|
|
// AsOf is the instant the graph was read at, RFC 3339: the one asked for, or the server's clock when none was.
|
|
AsOf *string `json:"as_of,omitempty"`
|
|
// Bound is the most members listed in one answer.
|
|
Bound *int64 `json:"bound,omitempty"`
|
|
// Ceiling is the most edge assertions one partition reads — every row, so an edge three sources asserted counts three times. A graph over it is refused rather than partitioned from part of itself.
|
|
Ceiling *int64 `json:"ceiling,omitempty"`
|
|
// Communities are the communities, largest first.
|
|
Communities []GraphGraphCommunity `json:"communities,omitempty"`
|
|
// Edges is how many distinct undirected edges were partitioned.
|
|
Edges *int64 `json:"edges,omitempty"`
|
|
// Entities is how many entities the edge graph holds. An entity with no edge in force at AsOf is in no community.
|
|
Entities *int64 `json:"entities,omitempty"`
|
|
// Level is the level answered.
|
|
Level *int64 `json:"level,omitempty"`
|
|
// Levels is how many levels detection found. A graph where no two entities belong together more than chance has one, of single entities.
|
|
Levels *int64 `json:"levels,omitempty"`
|
|
// Modularity is Newman's Q of this level's partition, from -0.5 to 1: the share of edge weight inside communities, less what chance would put there. Above about 0.3 is usually read as real structure rather than chance.
|
|
Modularity *float64 `json:"modularity,omitempty"`
|
|
// Truncated says the member lists stop at Bound entities in all, filled in community order. Every community is still listed with its full Size.
|
|
Truncated *bool `json:"truncated,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphCommunitiesOut GraphGraphCommunitiesOut
|
|
|
|
// NewGraphGraphCommunitiesOut instantiates a new GraphGraphCommunitiesOut 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 NewGraphGraphCommunitiesOut() *GraphGraphCommunitiesOut {
|
|
this := GraphGraphCommunitiesOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphCommunitiesOutWithDefaults instantiates a new GraphGraphCommunitiesOut 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 NewGraphGraphCommunitiesOutWithDefaults() *GraphGraphCommunitiesOut {
|
|
this := GraphGraphCommunitiesOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetAsKnown returns the AsKnown field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) 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 *GraphGraphCommunitiesOut) 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 *GraphGraphCommunitiesOut) 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 *GraphGraphCommunitiesOut) SetAsKnown(v string) {
|
|
o.AsKnown = &v
|
|
}
|
|
|
|
// GetAsOf returns the AsOf field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) 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 *GraphGraphCommunitiesOut) 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 *GraphGraphCommunitiesOut) 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 *GraphGraphCommunitiesOut) SetAsOf(v string) {
|
|
o.AsOf = &v
|
|
}
|
|
|
|
// GetBound returns the Bound field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) GetBound() int64 {
|
|
if o == nil || IsNil(o.Bound) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Bound
|
|
}
|
|
|
|
// GetBoundOk returns a tuple with the Bound field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesOut) GetBoundOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Bound) {
|
|
return nil, false
|
|
}
|
|
return o.Bound, true
|
|
}
|
|
|
|
// HasBound returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesOut) HasBound() bool {
|
|
if o != nil && !IsNil(o.Bound) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBound gets a reference to the given int64 and assigns it to the Bound field.
|
|
func (o *GraphGraphCommunitiesOut) SetBound(v int64) {
|
|
o.Bound = &v
|
|
}
|
|
|
|
// GetCeiling returns the Ceiling field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) GetCeiling() int64 {
|
|
if o == nil || IsNil(o.Ceiling) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Ceiling
|
|
}
|
|
|
|
// GetCeilingOk returns a tuple with the Ceiling field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesOut) GetCeilingOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Ceiling) {
|
|
return nil, false
|
|
}
|
|
return o.Ceiling, true
|
|
}
|
|
|
|
// HasCeiling returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesOut) HasCeiling() bool {
|
|
if o != nil && !IsNil(o.Ceiling) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCeiling gets a reference to the given int64 and assigns it to the Ceiling field.
|
|
func (o *GraphGraphCommunitiesOut) SetCeiling(v int64) {
|
|
o.Ceiling = &v
|
|
}
|
|
|
|
// GetCommunities returns the Communities field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) GetCommunities() []GraphGraphCommunity {
|
|
if o == nil || IsNil(o.Communities) {
|
|
var ret []GraphGraphCommunity
|
|
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 *GraphGraphCommunitiesOut) GetCommunitiesOk() ([]GraphGraphCommunity, 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 *GraphGraphCommunitiesOut) HasCommunities() bool {
|
|
if o != nil && !IsNil(o.Communities) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCommunities gets a reference to the given []GraphGraphCommunity and assigns it to the Communities field.
|
|
func (o *GraphGraphCommunitiesOut) SetCommunities(v []GraphGraphCommunity) {
|
|
o.Communities = v
|
|
}
|
|
|
|
// GetEdges returns the Edges field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) GetEdges() int64 {
|
|
if o == nil || IsNil(o.Edges) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Edges
|
|
}
|
|
|
|
// GetEdgesOk returns a tuple with the Edges field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesOut) GetEdgesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Edges) {
|
|
return nil, false
|
|
}
|
|
return o.Edges, true
|
|
}
|
|
|
|
// HasEdges returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesOut) HasEdges() bool {
|
|
if o != nil && !IsNil(o.Edges) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEdges gets a reference to the given int64 and assigns it to the Edges field.
|
|
func (o *GraphGraphCommunitiesOut) SetEdges(v int64) {
|
|
o.Edges = &v
|
|
}
|
|
|
|
// GetEntities returns the Entities field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) GetEntities() int64 {
|
|
if o == nil || IsNil(o.Entities) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Entities
|
|
}
|
|
|
|
// GetEntitiesOk returns a tuple with the Entities field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesOut) GetEntitiesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Entities) {
|
|
return nil, false
|
|
}
|
|
return o.Entities, true
|
|
}
|
|
|
|
// HasEntities returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesOut) HasEntities() bool {
|
|
if o != nil && !IsNil(o.Entities) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEntities gets a reference to the given int64 and assigns it to the Entities field.
|
|
func (o *GraphGraphCommunitiesOut) SetEntities(v int64) {
|
|
o.Entities = &v
|
|
}
|
|
|
|
// GetLevel returns the Level field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) 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 *GraphGraphCommunitiesOut) 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 *GraphGraphCommunitiesOut) 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 *GraphGraphCommunitiesOut) SetLevel(v int64) {
|
|
o.Level = &v
|
|
}
|
|
|
|
// GetLevels returns the Levels field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) GetLevels() int64 {
|
|
if o == nil || IsNil(o.Levels) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Levels
|
|
}
|
|
|
|
// GetLevelsOk returns a tuple with the Levels field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesOut) GetLevelsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Levels) {
|
|
return nil, false
|
|
}
|
|
return o.Levels, true
|
|
}
|
|
|
|
// HasLevels returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesOut) HasLevels() bool {
|
|
if o != nil && !IsNil(o.Levels) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLevels gets a reference to the given int64 and assigns it to the Levels field.
|
|
func (o *GraphGraphCommunitiesOut) SetLevels(v int64) {
|
|
o.Levels = &v
|
|
}
|
|
|
|
// GetModularity returns the Modularity field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) GetModularity() float64 {
|
|
if o == nil || IsNil(o.Modularity) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Modularity
|
|
}
|
|
|
|
// GetModularityOk returns a tuple with the Modularity field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesOut) GetModularityOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Modularity) {
|
|
return nil, false
|
|
}
|
|
return o.Modularity, true
|
|
}
|
|
|
|
// HasModularity returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesOut) HasModularity() bool {
|
|
if o != nil && !IsNil(o.Modularity) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModularity gets a reference to the given float64 and assigns it to the Modularity field.
|
|
func (o *GraphGraphCommunitiesOut) SetModularity(v float64) {
|
|
o.Modularity = &v
|
|
}
|
|
|
|
// GetTruncated returns the Truncated field value if set, zero value otherwise.
|
|
func (o *GraphGraphCommunitiesOut) GetTruncated() bool {
|
|
if o == nil || IsNil(o.Truncated) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Truncated
|
|
}
|
|
|
|
// GetTruncatedOk returns a tuple with the Truncated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphCommunitiesOut) GetTruncatedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Truncated) {
|
|
return nil, false
|
|
}
|
|
return o.Truncated, true
|
|
}
|
|
|
|
// HasTruncated returns a boolean if a field has been set.
|
|
func (o *GraphGraphCommunitiesOut) HasTruncated() bool {
|
|
if o != nil && !IsNil(o.Truncated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTruncated gets a reference to the given bool and assigns it to the Truncated field.
|
|
func (o *GraphGraphCommunitiesOut) SetTruncated(v bool) {
|
|
o.Truncated = &v
|
|
}
|
|
|
|
func (o GraphGraphCommunitiesOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphCommunitiesOut) 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.Bound) {
|
|
toSerialize["bound"] = o.Bound
|
|
}
|
|
if !IsNil(o.Ceiling) {
|
|
toSerialize["ceiling"] = o.Ceiling
|
|
}
|
|
if !IsNil(o.Communities) {
|
|
toSerialize["communities"] = o.Communities
|
|
}
|
|
if !IsNil(o.Edges) {
|
|
toSerialize["edges"] = o.Edges
|
|
}
|
|
if !IsNil(o.Entities) {
|
|
toSerialize["entities"] = o.Entities
|
|
}
|
|
if !IsNil(o.Level) {
|
|
toSerialize["level"] = o.Level
|
|
}
|
|
if !IsNil(o.Levels) {
|
|
toSerialize["levels"] = o.Levels
|
|
}
|
|
if !IsNil(o.Modularity) {
|
|
toSerialize["modularity"] = o.Modularity
|
|
}
|
|
if !IsNil(o.Truncated) {
|
|
toSerialize["truncated"] = o.Truncated
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphCommunitiesOut) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphCommunitiesOut := _GraphGraphCommunitiesOut{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphCommunitiesOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphCommunitiesOut(varGraphGraphCommunitiesOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "as_known")
|
|
delete(additionalProperties, "as_of")
|
|
delete(additionalProperties, "bound")
|
|
delete(additionalProperties, "ceiling")
|
|
delete(additionalProperties, "communities")
|
|
delete(additionalProperties, "edges")
|
|
delete(additionalProperties, "entities")
|
|
delete(additionalProperties, "level")
|
|
delete(additionalProperties, "levels")
|
|
delete(additionalProperties, "modularity")
|
|
delete(additionalProperties, "truncated")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphCommunitiesOut struct {
|
|
value *GraphGraphCommunitiesOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphCommunitiesOut) Get() *GraphGraphCommunitiesOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphCommunitiesOut) Set(val *GraphGraphCommunitiesOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphCommunitiesOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphCommunitiesOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphCommunitiesOut(val *GraphGraphCommunitiesOut) *NullableGraphGraphCommunitiesOut {
|
|
return &NullableGraphGraphCommunitiesOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphCommunitiesOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphCommunitiesOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|