Files
sdk/model_guide_profile_metrics.go

269 lines
8.2 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 GuideProfileMetrics type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GuideProfileMetrics{}
// GuideProfileMetrics struct for GuideProfileMetrics
type GuideProfileMetrics struct {
// Funnel is what the org's analytics observed over the trailing window. Read its `available` first: an org with no analytics reports zeros here, and zero traffic and no measurement are different facts.
Funnel *GuideFunnel `json:"funnel,omitempty"`
// LaunchProgress is the org's own position in the launch checklist, folded in so a profile carries both what the org has BUILT and what it has DONE.
LaunchProgress *GuideProgressView `json:"launchProgress,omitempty"`
// Records is how many business records the org holds — the volume that tells a real book of customers from an empty account. It feeds the `customers` signal, which crosses at a threshold rather than at one row.
Records *int64 `json:"records,omitempty"`
// RevenueCents is the org's money OF RECORD — what its books say, in whole cents, never a float and never a display string. This is the number the scaling stage is decided on; funnel.revenue is the beacon's separate, unreconciled view of the same business. Zero when the org has none, and also zero when the books could not be read, which is why the `revenue` signal beside it is the thing to trust.
RevenueCents *int64 `json:"revenueCents,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GuideProfileMetrics GuideProfileMetrics
// NewGuideProfileMetrics instantiates a new GuideProfileMetrics 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 NewGuideProfileMetrics() *GuideProfileMetrics {
this := GuideProfileMetrics{}
return &this
}
// NewGuideProfileMetricsWithDefaults instantiates a new GuideProfileMetrics 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 NewGuideProfileMetricsWithDefaults() *GuideProfileMetrics {
this := GuideProfileMetrics{}
return &this
}
// GetFunnel returns the Funnel field value if set, zero value otherwise.
func (o *GuideProfileMetrics) GetFunnel() GuideFunnel {
if o == nil || IsNil(o.Funnel) {
var ret GuideFunnel
return ret
}
return *o.Funnel
}
// GetFunnelOk returns a tuple with the Funnel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GuideProfileMetrics) GetFunnelOk() (*GuideFunnel, bool) {
if o == nil || IsNil(o.Funnel) {
return nil, false
}
return o.Funnel, true
}
// HasFunnel returns a boolean if a field has been set.
func (o *GuideProfileMetrics) HasFunnel() bool {
if o != nil && !IsNil(o.Funnel) {
return true
}
return false
}
// SetFunnel gets a reference to the given GuideFunnel and assigns it to the Funnel field.
func (o *GuideProfileMetrics) SetFunnel(v GuideFunnel) {
o.Funnel = &v
}
// GetLaunchProgress returns the LaunchProgress field value if set, zero value otherwise.
func (o *GuideProfileMetrics) GetLaunchProgress() GuideProgressView {
if o == nil || IsNil(o.LaunchProgress) {
var ret GuideProgressView
return ret
}
return *o.LaunchProgress
}
// GetLaunchProgressOk returns a tuple with the LaunchProgress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GuideProfileMetrics) GetLaunchProgressOk() (*GuideProgressView, bool) {
if o == nil || IsNil(o.LaunchProgress) {
return nil, false
}
return o.LaunchProgress, true
}
// HasLaunchProgress returns a boolean if a field has been set.
func (o *GuideProfileMetrics) HasLaunchProgress() bool {
if o != nil && !IsNil(o.LaunchProgress) {
return true
}
return false
}
// SetLaunchProgress gets a reference to the given GuideProgressView and assigns it to the LaunchProgress field.
func (o *GuideProfileMetrics) SetLaunchProgress(v GuideProgressView) {
o.LaunchProgress = &v
}
// GetRecords returns the Records field value if set, zero value otherwise.
func (o *GuideProfileMetrics) GetRecords() int64 {
if o == nil || IsNil(o.Records) {
var ret int64
return ret
}
return *o.Records
}
// GetRecordsOk returns a tuple with the Records field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GuideProfileMetrics) GetRecordsOk() (*int64, bool) {
if o == nil || IsNil(o.Records) {
return nil, false
}
return o.Records, true
}
// HasRecords returns a boolean if a field has been set.
func (o *GuideProfileMetrics) HasRecords() bool {
if o != nil && !IsNil(o.Records) {
return true
}
return false
}
// SetRecords gets a reference to the given int64 and assigns it to the Records field.
func (o *GuideProfileMetrics) SetRecords(v int64) {
o.Records = &v
}
// GetRevenueCents returns the RevenueCents field value if set, zero value otherwise.
func (o *GuideProfileMetrics) GetRevenueCents() int64 {
if o == nil || IsNil(o.RevenueCents) {
var ret int64
return ret
}
return *o.RevenueCents
}
// GetRevenueCentsOk returns a tuple with the RevenueCents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GuideProfileMetrics) GetRevenueCentsOk() (*int64, bool) {
if o == nil || IsNil(o.RevenueCents) {
return nil, false
}
return o.RevenueCents, true
}
// HasRevenueCents returns a boolean if a field has been set.
func (o *GuideProfileMetrics) HasRevenueCents() bool {
if o != nil && !IsNil(o.RevenueCents) {
return true
}
return false
}
// SetRevenueCents gets a reference to the given int64 and assigns it to the RevenueCents field.
func (o *GuideProfileMetrics) SetRevenueCents(v int64) {
o.RevenueCents = &v
}
func (o GuideProfileMetrics) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GuideProfileMetrics) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Funnel) {
toSerialize["funnel"] = o.Funnel
}
if !IsNil(o.LaunchProgress) {
toSerialize["launchProgress"] = o.LaunchProgress
}
if !IsNil(o.Records) {
toSerialize["records"] = o.Records
}
if !IsNil(o.RevenueCents) {
toSerialize["revenueCents"] = o.RevenueCents
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GuideProfileMetrics) UnmarshalJSON(data []byte) (err error) {
varGuideProfileMetrics := _GuideProfileMetrics{}
err = json.Unmarshal(data, &varGuideProfileMetrics)
if err != nil {
return err
}
*o = GuideProfileMetrics(varGuideProfileMetrics)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "funnel")
delete(additionalProperties, "launchProgress")
delete(additionalProperties, "records")
delete(additionalProperties, "revenueCents")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGuideProfileMetrics struct {
value *GuideProfileMetrics
isSet bool
}
func (v NullableGuideProfileMetrics) Get() *GuideProfileMetrics {
return v.value
}
func (v *NullableGuideProfileMetrics) Set(val *GuideProfileMetrics) {
v.value = val
v.isSet = true
}
func (v NullableGuideProfileMetrics) IsSet() bool {
return v.isSet
}
func (v *NullableGuideProfileMetrics) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGuideProfileMetrics(val *GuideProfileMetrics) *NullableGuideProfileMetrics {
return &NullableGuideProfileMetrics{value: val, isSet: true}
}
func (v NullableGuideProfileMetrics) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGuideProfileMetrics) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}