Files
sdk/model_git_activity_out.go

687 lines
18 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 GitActivityOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GitActivityOut{}
// GitActivityOut struct for GitActivityOut
type GitActivityOut struct {
// Active is how many repositories have a commit on each UTC day.
Active map[string]int64 `json:"active,omitempty"`
// Complete is false while a repository the forge lists has never been read.
Complete *bool `json:"complete,omitempty"`
// Daily is the estate's distinct commits per UTC day, YYYY-MM-DD.
Daily map[string]int64 `json:"daily,omitempty"`
// GitHub is when the mirror last read GitHub, RFC 3339 UTC.
Github *string `json:"github,omitempty"`
// Groups is each group, most commits first.
Groups []GitActivityGroup `json:"groups,omitempty"`
// Latest is the newest commits of public repositories, newest first.
Latest []GitActivityCommit `json:"latest,omitempty"`
// Months names the calendar months every Months series counts, YYYY-MM, oldest first.
Months []string `json:"months,omitempty"`
// Orgs is each org, most commits first.
Orgs []GitActivityOrg `json:"orgs,omitempty"`
// OursDaily is the estate's own commits per UTC day.
OursDaily map[string]int64 `json:"oursDaily,omitempty"`
// Read is when the index wrote this, RFC 3339 UTC.
Read *string `json:"read,omitempty"`
// Repos is the page of public repositories asked for.
Repos *GitActivityPage `json:"repos,omitempty"`
// Source names what was read: \"forge\", its repositories and database.
Source *string `json:"source,omitempty"`
// Totals is the whole estate.
Totals *GitActivityTotals `json:"totals,omitempty"`
// Unread is how many such repositories there are.
Unread *int64 `json:"unread,omitempty"`
// Window is the span counted.
Window *GitActivityWindow `json:"window,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GitActivityOut GitActivityOut
// NewGitActivityOut instantiates a new GitActivityOut 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 NewGitActivityOut() *GitActivityOut {
this := GitActivityOut{}
return &this
}
// NewGitActivityOutWithDefaults instantiates a new GitActivityOut 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 NewGitActivityOutWithDefaults() *GitActivityOut {
this := GitActivityOut{}
return &this
}
// GetActive returns the Active field value if set, zero value otherwise.
func (o *GitActivityOut) GetActive() map[string]int64 {
if o == nil || IsNil(o.Active) {
var ret map[string]int64
return ret
}
return o.Active
}
// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetActiveOk() (map[string]int64, bool) {
if o == nil || IsNil(o.Active) {
return map[string]int64{}, false
}
return o.Active, true
}
// HasActive returns a boolean if a field has been set.
func (o *GitActivityOut) HasActive() bool {
if o != nil && !IsNil(o.Active) {
return true
}
return false
}
// SetActive gets a reference to the given map[string]int64 and assigns it to the Active field.
func (o *GitActivityOut) SetActive(v map[string]int64) {
o.Active = v
}
// GetComplete returns the Complete field value if set, zero value otherwise.
func (o *GitActivityOut) GetComplete() bool {
if o == nil || IsNil(o.Complete) {
var ret bool
return ret
}
return *o.Complete
}
// GetCompleteOk returns a tuple with the Complete field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetCompleteOk() (*bool, bool) {
if o == nil || IsNil(o.Complete) {
return nil, false
}
return o.Complete, true
}
// HasComplete returns a boolean if a field has been set.
func (o *GitActivityOut) HasComplete() bool {
if o != nil && !IsNil(o.Complete) {
return true
}
return false
}
// SetComplete gets a reference to the given bool and assigns it to the Complete field.
func (o *GitActivityOut) SetComplete(v bool) {
o.Complete = &v
}
// GetDaily returns the Daily field value if set, zero value otherwise.
func (o *GitActivityOut) GetDaily() map[string]int64 {
if o == nil || IsNil(o.Daily) {
var ret map[string]int64
return ret
}
return o.Daily
}
// GetDailyOk returns a tuple with the Daily field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetDailyOk() (map[string]int64, bool) {
if o == nil || IsNil(o.Daily) {
return map[string]int64{}, false
}
return o.Daily, true
}
// HasDaily returns a boolean if a field has been set.
func (o *GitActivityOut) HasDaily() bool {
if o != nil && !IsNil(o.Daily) {
return true
}
return false
}
// SetDaily gets a reference to the given map[string]int64 and assigns it to the Daily field.
func (o *GitActivityOut) SetDaily(v map[string]int64) {
o.Daily = v
}
// GetGithub returns the Github field value if set, zero value otherwise.
func (o *GitActivityOut) GetGithub() string {
if o == nil || IsNil(o.Github) {
var ret string
return ret
}
return *o.Github
}
// GetGithubOk returns a tuple with the Github field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetGithubOk() (*string, bool) {
if o == nil || IsNil(o.Github) {
return nil, false
}
return o.Github, true
}
// HasGithub returns a boolean if a field has been set.
func (o *GitActivityOut) HasGithub() bool {
if o != nil && !IsNil(o.Github) {
return true
}
return false
}
// SetGithub gets a reference to the given string and assigns it to the Github field.
func (o *GitActivityOut) SetGithub(v string) {
o.Github = &v
}
// GetGroups returns the Groups field value if set, zero value otherwise.
func (o *GitActivityOut) GetGroups() []GitActivityGroup {
if o == nil || IsNil(o.Groups) {
var ret []GitActivityGroup
return ret
}
return o.Groups
}
// GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetGroupsOk() ([]GitActivityGroup, bool) {
if o == nil || IsNil(o.Groups) {
return nil, false
}
return o.Groups, true
}
// HasGroups returns a boolean if a field has been set.
func (o *GitActivityOut) HasGroups() bool {
if o != nil && !IsNil(o.Groups) {
return true
}
return false
}
// SetGroups gets a reference to the given []GitActivityGroup and assigns it to the Groups field.
func (o *GitActivityOut) SetGroups(v []GitActivityGroup) {
o.Groups = v
}
// GetLatest returns the Latest field value if set, zero value otherwise.
func (o *GitActivityOut) GetLatest() []GitActivityCommit {
if o == nil || IsNil(o.Latest) {
var ret []GitActivityCommit
return ret
}
return o.Latest
}
// GetLatestOk returns a tuple with the Latest field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetLatestOk() ([]GitActivityCommit, bool) {
if o == nil || IsNil(o.Latest) {
return nil, false
}
return o.Latest, true
}
// HasLatest returns a boolean if a field has been set.
func (o *GitActivityOut) HasLatest() bool {
if o != nil && !IsNil(o.Latest) {
return true
}
return false
}
// SetLatest gets a reference to the given []GitActivityCommit and assigns it to the Latest field.
func (o *GitActivityOut) SetLatest(v []GitActivityCommit) {
o.Latest = v
}
// GetMonths returns the Months field value if set, zero value otherwise.
func (o *GitActivityOut) GetMonths() []string {
if o == nil || IsNil(o.Months) {
var ret []string
return ret
}
return o.Months
}
// GetMonthsOk returns a tuple with the Months field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetMonthsOk() ([]string, bool) {
if o == nil || IsNil(o.Months) {
return nil, false
}
return o.Months, true
}
// HasMonths returns a boolean if a field has been set.
func (o *GitActivityOut) HasMonths() bool {
if o != nil && !IsNil(o.Months) {
return true
}
return false
}
// SetMonths gets a reference to the given []string and assigns it to the Months field.
func (o *GitActivityOut) SetMonths(v []string) {
o.Months = v
}
// GetOrgs returns the Orgs field value if set, zero value otherwise.
func (o *GitActivityOut) GetOrgs() []GitActivityOrg {
if o == nil || IsNil(o.Orgs) {
var ret []GitActivityOrg
return ret
}
return o.Orgs
}
// GetOrgsOk returns a tuple with the Orgs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetOrgsOk() ([]GitActivityOrg, bool) {
if o == nil || IsNil(o.Orgs) {
return nil, false
}
return o.Orgs, true
}
// HasOrgs returns a boolean if a field has been set.
func (o *GitActivityOut) HasOrgs() bool {
if o != nil && !IsNil(o.Orgs) {
return true
}
return false
}
// SetOrgs gets a reference to the given []GitActivityOrg and assigns it to the Orgs field.
func (o *GitActivityOut) SetOrgs(v []GitActivityOrg) {
o.Orgs = v
}
// GetOursDaily returns the OursDaily field value if set, zero value otherwise.
func (o *GitActivityOut) GetOursDaily() map[string]int64 {
if o == nil || IsNil(o.OursDaily) {
var ret map[string]int64
return ret
}
return o.OursDaily
}
// GetOursDailyOk returns a tuple with the OursDaily field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetOursDailyOk() (map[string]int64, bool) {
if o == nil || IsNil(o.OursDaily) {
return map[string]int64{}, false
}
return o.OursDaily, true
}
// HasOursDaily returns a boolean if a field has been set.
func (o *GitActivityOut) HasOursDaily() bool {
if o != nil && !IsNil(o.OursDaily) {
return true
}
return false
}
// SetOursDaily gets a reference to the given map[string]int64 and assigns it to the OursDaily field.
func (o *GitActivityOut) SetOursDaily(v map[string]int64) {
o.OursDaily = v
}
// GetRead returns the Read field value if set, zero value otherwise.
func (o *GitActivityOut) GetRead() string {
if o == nil || IsNil(o.Read) {
var ret string
return ret
}
return *o.Read
}
// GetReadOk returns a tuple with the Read field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetReadOk() (*string, bool) {
if o == nil || IsNil(o.Read) {
return nil, false
}
return o.Read, true
}
// HasRead returns a boolean if a field has been set.
func (o *GitActivityOut) HasRead() bool {
if o != nil && !IsNil(o.Read) {
return true
}
return false
}
// SetRead gets a reference to the given string and assigns it to the Read field.
func (o *GitActivityOut) SetRead(v string) {
o.Read = &v
}
// GetRepos returns the Repos field value if set, zero value otherwise.
func (o *GitActivityOut) GetRepos() GitActivityPage {
if o == nil || IsNil(o.Repos) {
var ret GitActivityPage
return ret
}
return *o.Repos
}
// GetReposOk returns a tuple with the Repos field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetReposOk() (*GitActivityPage, bool) {
if o == nil || IsNil(o.Repos) {
return nil, false
}
return o.Repos, true
}
// HasRepos returns a boolean if a field has been set.
func (o *GitActivityOut) HasRepos() bool {
if o != nil && !IsNil(o.Repos) {
return true
}
return false
}
// SetRepos gets a reference to the given GitActivityPage and assigns it to the Repos field.
func (o *GitActivityOut) SetRepos(v GitActivityPage) {
o.Repos = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *GitActivityOut) GetSource() string {
if o == nil || IsNil(o.Source) {
var ret string
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetSourceOk() (*string, bool) {
if o == nil || IsNil(o.Source) {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *GitActivityOut) HasSource() bool {
if o != nil && !IsNil(o.Source) {
return true
}
return false
}
// SetSource gets a reference to the given string and assigns it to the Source field.
func (o *GitActivityOut) SetSource(v string) {
o.Source = &v
}
// GetTotals returns the Totals field value if set, zero value otherwise.
func (o *GitActivityOut) GetTotals() GitActivityTotals {
if o == nil || IsNil(o.Totals) {
var ret GitActivityTotals
return ret
}
return *o.Totals
}
// GetTotalsOk returns a tuple with the Totals field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetTotalsOk() (*GitActivityTotals, bool) {
if o == nil || IsNil(o.Totals) {
return nil, false
}
return o.Totals, true
}
// HasTotals returns a boolean if a field has been set.
func (o *GitActivityOut) HasTotals() bool {
if o != nil && !IsNil(o.Totals) {
return true
}
return false
}
// SetTotals gets a reference to the given GitActivityTotals and assigns it to the Totals field.
func (o *GitActivityOut) SetTotals(v GitActivityTotals) {
o.Totals = &v
}
// GetUnread returns the Unread field value if set, zero value otherwise.
func (o *GitActivityOut) GetUnread() int64 {
if o == nil || IsNil(o.Unread) {
var ret int64
return ret
}
return *o.Unread
}
// GetUnreadOk returns a tuple with the Unread field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetUnreadOk() (*int64, bool) {
if o == nil || IsNil(o.Unread) {
return nil, false
}
return o.Unread, true
}
// HasUnread returns a boolean if a field has been set.
func (o *GitActivityOut) HasUnread() bool {
if o != nil && !IsNil(o.Unread) {
return true
}
return false
}
// SetUnread gets a reference to the given int64 and assigns it to the Unread field.
func (o *GitActivityOut) SetUnread(v int64) {
o.Unread = &v
}
// GetWindow returns the Window field value if set, zero value otherwise.
func (o *GitActivityOut) GetWindow() GitActivityWindow {
if o == nil || IsNil(o.Window) {
var ret GitActivityWindow
return ret
}
return *o.Window
}
// GetWindowOk returns a tuple with the Window field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitActivityOut) GetWindowOk() (*GitActivityWindow, bool) {
if o == nil || IsNil(o.Window) {
return nil, false
}
return o.Window, true
}
// HasWindow returns a boolean if a field has been set.
func (o *GitActivityOut) HasWindow() bool {
if o != nil && !IsNil(o.Window) {
return true
}
return false
}
// SetWindow gets a reference to the given GitActivityWindow and assigns it to the Window field.
func (o *GitActivityOut) SetWindow(v GitActivityWindow) {
o.Window = &v
}
func (o GitActivityOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GitActivityOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Active) {
toSerialize["active"] = o.Active
}
if !IsNil(o.Complete) {
toSerialize["complete"] = o.Complete
}
if !IsNil(o.Daily) {
toSerialize["daily"] = o.Daily
}
if !IsNil(o.Github) {
toSerialize["github"] = o.Github
}
if !IsNil(o.Groups) {
toSerialize["groups"] = o.Groups
}
if !IsNil(o.Latest) {
toSerialize["latest"] = o.Latest
}
if !IsNil(o.Months) {
toSerialize["months"] = o.Months
}
if !IsNil(o.Orgs) {
toSerialize["orgs"] = o.Orgs
}
if !IsNil(o.OursDaily) {
toSerialize["oursDaily"] = o.OursDaily
}
if !IsNil(o.Read) {
toSerialize["read"] = o.Read
}
if !IsNil(o.Repos) {
toSerialize["repos"] = o.Repos
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
if !IsNil(o.Totals) {
toSerialize["totals"] = o.Totals
}
if !IsNil(o.Unread) {
toSerialize["unread"] = o.Unread
}
if !IsNil(o.Window) {
toSerialize["window"] = o.Window
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GitActivityOut) UnmarshalJSON(data []byte) (err error) {
varGitActivityOut := _GitActivityOut{}
err = json.Unmarshal(data, &varGitActivityOut)
if err != nil {
return err
}
*o = GitActivityOut(varGitActivityOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "active")
delete(additionalProperties, "complete")
delete(additionalProperties, "daily")
delete(additionalProperties, "github")
delete(additionalProperties, "groups")
delete(additionalProperties, "latest")
delete(additionalProperties, "months")
delete(additionalProperties, "orgs")
delete(additionalProperties, "oursDaily")
delete(additionalProperties, "read")
delete(additionalProperties, "repos")
delete(additionalProperties, "source")
delete(additionalProperties, "totals")
delete(additionalProperties, "unread")
delete(additionalProperties, "window")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGitActivityOut struct {
value *GitActivityOut
isSet bool
}
func (v NullableGitActivityOut) Get() *GitActivityOut {
return v.value
}
func (v *NullableGitActivityOut) Set(val *GitActivityOut) {
v.value = val
v.isSet = true
}
func (v NullableGitActivityOut) IsSet() bool {
return v.isSet
}
func (v *NullableGitActivityOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGitActivityOut(val *GitActivityOut) *NullableGitActivityOut {
return &NullableGitActivityOut{value: val, isSet: true}
}
func (v NullableGitActivityOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGitActivityOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}