Files
sdk/model_dataroom_dataroom_stats.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 DataroomDataroomStats type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DataroomDataroomStats{}
// DataroomDataroomStats struct for DataroomDataroomStats
type DataroomDataroomStats struct {
// DataroomId is the room these counts are for.
DataroomId *string `json:"dataroomId,omitempty"`
// Links is the same per-page breakdown for each link into the room.
Links []DataroomDataroomLinkStats `json:"links,omitempty"`
// TotalPageViews is the room's page views across every link.
TotalPageViews *int64 `json:"totalPageViews,omitempty"`
// TotalViews is the room's viewing sessions across every link.
TotalViews *int64 `json:"totalViews,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DataroomDataroomStats DataroomDataroomStats
// NewDataroomDataroomStats instantiates a new DataroomDataroomStats 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 NewDataroomDataroomStats() *DataroomDataroomStats {
this := DataroomDataroomStats{}
return &this
}
// NewDataroomDataroomStatsWithDefaults instantiates a new DataroomDataroomStats 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 NewDataroomDataroomStatsWithDefaults() *DataroomDataroomStats {
this := DataroomDataroomStats{}
return &this
}
// GetDataroomId returns the DataroomId field value if set, zero value otherwise.
func (o *DataroomDataroomStats) GetDataroomId() string {
if o == nil || IsNil(o.DataroomId) {
var ret string
return ret
}
return *o.DataroomId
}
// GetDataroomIdOk returns a tuple with the DataroomId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomStats) GetDataroomIdOk() (*string, bool) {
if o == nil || IsNil(o.DataroomId) {
return nil, false
}
return o.DataroomId, true
}
// HasDataroomId returns a boolean if a field has been set.
func (o *DataroomDataroomStats) HasDataroomId() bool {
if o != nil && !IsNil(o.DataroomId) {
return true
}
return false
}
// SetDataroomId gets a reference to the given string and assigns it to the DataroomId field.
func (o *DataroomDataroomStats) SetDataroomId(v string) {
o.DataroomId = &v
}
// GetLinks returns the Links field value if set, zero value otherwise.
func (o *DataroomDataroomStats) GetLinks() []DataroomDataroomLinkStats {
if o == nil || IsNil(o.Links) {
var ret []DataroomDataroomLinkStats
return ret
}
return o.Links
}
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomStats) GetLinksOk() ([]DataroomDataroomLinkStats, bool) {
if o == nil || IsNil(o.Links) {
return nil, false
}
return o.Links, true
}
// HasLinks returns a boolean if a field has been set.
func (o *DataroomDataroomStats) HasLinks() bool {
if o != nil && !IsNil(o.Links) {
return true
}
return false
}
// SetLinks gets a reference to the given []DataroomDataroomLinkStats and assigns it to the Links field.
func (o *DataroomDataroomStats) SetLinks(v []DataroomDataroomLinkStats) {
o.Links = v
}
// GetTotalPageViews returns the TotalPageViews field value if set, zero value otherwise.
func (o *DataroomDataroomStats) GetTotalPageViews() int64 {
if o == nil || IsNil(o.TotalPageViews) {
var ret int64
return ret
}
return *o.TotalPageViews
}
// GetTotalPageViewsOk returns a tuple with the TotalPageViews field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomStats) GetTotalPageViewsOk() (*int64, bool) {
if o == nil || IsNil(o.TotalPageViews) {
return nil, false
}
return o.TotalPageViews, true
}
// HasTotalPageViews returns a boolean if a field has been set.
func (o *DataroomDataroomStats) HasTotalPageViews() bool {
if o != nil && !IsNil(o.TotalPageViews) {
return true
}
return false
}
// SetTotalPageViews gets a reference to the given int64 and assigns it to the TotalPageViews field.
func (o *DataroomDataroomStats) SetTotalPageViews(v int64) {
o.TotalPageViews = &v
}
// GetTotalViews returns the TotalViews field value if set, zero value otherwise.
func (o *DataroomDataroomStats) GetTotalViews() int64 {
if o == nil || IsNil(o.TotalViews) {
var ret int64
return ret
}
return *o.TotalViews
}
// GetTotalViewsOk returns a tuple with the TotalViews field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomStats) GetTotalViewsOk() (*int64, bool) {
if o == nil || IsNil(o.TotalViews) {
return nil, false
}
return o.TotalViews, true
}
// HasTotalViews returns a boolean if a field has been set.
func (o *DataroomDataroomStats) HasTotalViews() bool {
if o != nil && !IsNil(o.TotalViews) {
return true
}
return false
}
// SetTotalViews gets a reference to the given int64 and assigns it to the TotalViews field.
func (o *DataroomDataroomStats) SetTotalViews(v int64) {
o.TotalViews = &v
}
func (o DataroomDataroomStats) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DataroomDataroomStats) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DataroomId) {
toSerialize["dataroomId"] = o.DataroomId
}
if !IsNil(o.Links) {
toSerialize["links"] = o.Links
}
if !IsNil(o.TotalPageViews) {
toSerialize["totalPageViews"] = o.TotalPageViews
}
if !IsNil(o.TotalViews) {
toSerialize["totalViews"] = o.TotalViews
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DataroomDataroomStats) UnmarshalJSON(data []byte) (err error) {
varDataroomDataroomStats := _DataroomDataroomStats{}
err = json.Unmarshal(data, &varDataroomDataroomStats)
if err != nil {
return err
}
*o = DataroomDataroomStats(varDataroomDataroomStats)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "dataroomId")
delete(additionalProperties, "links")
delete(additionalProperties, "totalPageViews")
delete(additionalProperties, "totalViews")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDataroomDataroomStats struct {
value *DataroomDataroomStats
isSet bool
}
func (v NullableDataroomDataroomStats) Get() *DataroomDataroomStats {
return v.value
}
func (v *NullableDataroomDataroomStats) Set(val *DataroomDataroomStats) {
v.value = val
v.isSet = true
}
func (v NullableDataroomDataroomStats) IsSet() bool {
return v.isSet
}
func (v *NullableDataroomDataroomStats) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDataroomDataroomStats(val *DataroomDataroomStats) *NullableDataroomDataroomStats {
return &NullableDataroomDataroomStats{value: val, isSet: true}
}
func (v NullableDataroomDataroomStats) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDataroomDataroomStats) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}