|
| 1 | +// Code based on the AtlasAPI V2 OpenAPI file |
| 2 | + |
| 3 | +package admin |
| 4 | + |
| 5 | +import ( |
| 6 | + "encoding/json" |
| 7 | +) |
| 8 | + |
| 9 | +// CollStatsRankedNamespaces struct for CollStatsRankedNamespaces |
| 10 | +type CollStatsRankedNamespaces struct { |
| 11 | + // Unique 24-hexadecimal digit string that identifies the request project. |
| 12 | + // Read only field. |
| 13 | + GroupId *string `json:"groupId,omitempty"` |
| 14 | + // Unique 24-hexadecimal digit string that identifies the request process. |
| 15 | + // Read only field. |
| 16 | + IdentifierId *string `json:"identifierId,omitempty"` |
| 17 | + // Ordered list of the hottest namespaces, highest value first. |
| 18 | + // Read only field. |
| 19 | + RankedNamespaces *[]string `json:"rankedNamespaces,omitempty"` |
| 20 | +} |
| 21 | + |
| 22 | +// NewCollStatsRankedNamespaces instantiates a new CollStatsRankedNamespaces object |
| 23 | +// This constructor will assign default values to properties that have it defined, |
| 24 | +// and makes sure properties required by API are set, but the set of arguments |
| 25 | +// will change when the set of required properties is changed |
| 26 | +func NewCollStatsRankedNamespaces() *CollStatsRankedNamespaces { |
| 27 | + this := CollStatsRankedNamespaces{} |
| 28 | + return &this |
| 29 | +} |
| 30 | + |
| 31 | +// NewCollStatsRankedNamespacesWithDefaults instantiates a new CollStatsRankedNamespaces object |
| 32 | +// This constructor will only assign default values to properties that have it defined, |
| 33 | +// but it doesn't guarantee that properties required by API are set |
| 34 | +func NewCollStatsRankedNamespacesWithDefaults() *CollStatsRankedNamespaces { |
| 35 | + this := CollStatsRankedNamespaces{} |
| 36 | + return &this |
| 37 | +} |
| 38 | + |
| 39 | +// GetGroupId returns the GroupId field value if set, zero value otherwise |
| 40 | +func (o *CollStatsRankedNamespaces) GetGroupId() string { |
| 41 | + if o == nil || IsNil(o.GroupId) { |
| 42 | + var ret string |
| 43 | + return ret |
| 44 | + } |
| 45 | + return *o.GroupId |
| 46 | +} |
| 47 | + |
| 48 | +// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise |
| 49 | +// and a boolean to check if the value has been set. |
| 50 | +func (o *CollStatsRankedNamespaces) GetGroupIdOk() (*string, bool) { |
| 51 | + if o == nil || IsNil(o.GroupId) { |
| 52 | + return nil, false |
| 53 | + } |
| 54 | + |
| 55 | + return o.GroupId, true |
| 56 | +} |
| 57 | + |
| 58 | +// HasGroupId returns a boolean if a field has been set. |
| 59 | +func (o *CollStatsRankedNamespaces) HasGroupId() bool { |
| 60 | + if o != nil && !IsNil(o.GroupId) { |
| 61 | + return true |
| 62 | + } |
| 63 | + |
| 64 | + return false |
| 65 | +} |
| 66 | + |
| 67 | +// SetGroupId gets a reference to the given string and assigns it to the GroupId field. |
| 68 | +func (o *CollStatsRankedNamespaces) SetGroupId(v string) { |
| 69 | + o.GroupId = &v |
| 70 | +} |
| 71 | + |
| 72 | +// GetIdentifierId returns the IdentifierId field value if set, zero value otherwise |
| 73 | +func (o *CollStatsRankedNamespaces) GetIdentifierId() string { |
| 74 | + if o == nil || IsNil(o.IdentifierId) { |
| 75 | + var ret string |
| 76 | + return ret |
| 77 | + } |
| 78 | + return *o.IdentifierId |
| 79 | +} |
| 80 | + |
| 81 | +// GetIdentifierIdOk returns a tuple with the IdentifierId field value if set, nil otherwise |
| 82 | +// and a boolean to check if the value has been set. |
| 83 | +func (o *CollStatsRankedNamespaces) GetIdentifierIdOk() (*string, bool) { |
| 84 | + if o == nil || IsNil(o.IdentifierId) { |
| 85 | + return nil, false |
| 86 | + } |
| 87 | + |
| 88 | + return o.IdentifierId, true |
| 89 | +} |
| 90 | + |
| 91 | +// HasIdentifierId returns a boolean if a field has been set. |
| 92 | +func (o *CollStatsRankedNamespaces) HasIdentifierId() bool { |
| 93 | + if o != nil && !IsNil(o.IdentifierId) { |
| 94 | + return true |
| 95 | + } |
| 96 | + |
| 97 | + return false |
| 98 | +} |
| 99 | + |
| 100 | +// SetIdentifierId gets a reference to the given string and assigns it to the IdentifierId field. |
| 101 | +func (o *CollStatsRankedNamespaces) SetIdentifierId(v string) { |
| 102 | + o.IdentifierId = &v |
| 103 | +} |
| 104 | + |
| 105 | +// GetRankedNamespaces returns the RankedNamespaces field value if set, zero value otherwise |
| 106 | +func (o *CollStatsRankedNamespaces) GetRankedNamespaces() []string { |
| 107 | + if o == nil || IsNil(o.RankedNamespaces) { |
| 108 | + var ret []string |
| 109 | + return ret |
| 110 | + } |
| 111 | + return *o.RankedNamespaces |
| 112 | +} |
| 113 | + |
| 114 | +// GetRankedNamespacesOk returns a tuple with the RankedNamespaces field value if set, nil otherwise |
| 115 | +// and a boolean to check if the value has been set. |
| 116 | +func (o *CollStatsRankedNamespaces) GetRankedNamespacesOk() (*[]string, bool) { |
| 117 | + if o == nil || IsNil(o.RankedNamespaces) { |
| 118 | + return nil, false |
| 119 | + } |
| 120 | + |
| 121 | + return o.RankedNamespaces, true |
| 122 | +} |
| 123 | + |
| 124 | +// HasRankedNamespaces returns a boolean if a field has been set. |
| 125 | +func (o *CollStatsRankedNamespaces) HasRankedNamespaces() bool { |
| 126 | + if o != nil && !IsNil(o.RankedNamespaces) { |
| 127 | + return true |
| 128 | + } |
| 129 | + |
| 130 | + return false |
| 131 | +} |
| 132 | + |
| 133 | +// SetRankedNamespaces gets a reference to the given []string and assigns it to the RankedNamespaces field. |
| 134 | +func (o *CollStatsRankedNamespaces) SetRankedNamespaces(v []string) { |
| 135 | + o.RankedNamespaces = &v |
| 136 | +} |
| 137 | + |
| 138 | +func (o CollStatsRankedNamespaces) MarshalJSONWithoutReadOnly() ([]byte, error) { |
| 139 | + toSerialize, err := o.ToMap() |
| 140 | + if err != nil { |
| 141 | + return []byte{}, err |
| 142 | + } |
| 143 | + return json.Marshal(toSerialize) |
| 144 | +} |
| 145 | +func (o CollStatsRankedNamespaces) ToMap() (map[string]interface{}, error) { |
| 146 | + toSerialize := map[string]interface{}{} |
| 147 | + return toSerialize, nil |
| 148 | +} |
0 commit comments