Class: AnalyticsOps::Governance::AccessReport
- Inherits:
-
Object
- Object
- AnalyticsOps::Governance::AccessReport
- Defined in:
- lib/analytics_ops/governance.rb,
sig/analytics_ops.rbs
Overview
Bounded aggregate report of Data API quota usage.
Instance Attribute Summary collapse
-
#dimension_headers ⇒ Array[String]
readonly
Returns the value of attribute dimension_headers.
-
#metric_headers ⇒ Array[String]
readonly
Returns the value of attribute metric_headers.
-
#property_id ⇒ String
readonly
Returns the value of attribute property_id.
-
#quota ⇒ record
readonly
Returns the value of attribute quota.
-
#row_count ⇒ Integer
readonly
Returns the value of attribute row_count.
-
#rows ⇒ Array[record]
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
-
#initialize(property_id:, dimension_headers:, metric_headers:, rows:, row_count:, quota:) ⇒ AccessReport
constructor
A new instance of AccessReport.
- #to_h ⇒ record
Constructor Details
#initialize(property_id:, dimension_headers:, metric_headers:, rows:, row_count:, quota:) ⇒ AccessReport
Returns a new instance of AccessReport.
192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/analytics_ops/governance.rb', line 192 def initialize(property_id:, dimension_headers:, metric_headers:, rows:, row_count:, quota:) validate_property_id!(property_id) headers = validate_headers!(dimension_headers, metric_headers) validate_rows!(rows, headers) validate_summary!(rows, row_count, quota) @property_id = property_id.dup.freeze @dimension_headers = Canonical.immutable(dimension_headers) @metric_headers = Canonical.immutable(metric_headers) @rows = Canonical.immutable(rows) @row_count = row_count @quota = Canonical.immutable(quota) freeze end |
Instance Attribute Details
#dimension_headers ⇒ Array[String] (readonly)
Returns the value of attribute dimension_headers.
190 191 192 |
# File 'lib/analytics_ops/governance.rb', line 190 def dimension_headers @dimension_headers end |
#metric_headers ⇒ Array[String] (readonly)
Returns the value of attribute metric_headers.
190 191 192 |
# File 'lib/analytics_ops/governance.rb', line 190 def metric_headers @metric_headers end |
#property_id ⇒ String (readonly)
Returns the value of attribute property_id.
190 191 192 |
# File 'lib/analytics_ops/governance.rb', line 190 def property_id @property_id end |
#quota ⇒ record (readonly)
Returns the value of attribute quota.
190 191 192 |
# File 'lib/analytics_ops/governance.rb', line 190 def quota @quota end |
#row_count ⇒ Integer (readonly)
Returns the value of attribute row_count.
190 191 192 |
# File 'lib/analytics_ops/governance.rb', line 190 def row_count @row_count end |
#rows ⇒ Array[record] (readonly)
Returns the value of attribute rows.
190 191 192 |
# File 'lib/analytics_ops/governance.rb', line 190 def rows @rows end |
Instance Method Details
#to_h ⇒ record
207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/analytics_ops/governance.rb', line 207 def to_h { "experimental" => true, "property_id" => property_id, "dimension_headers" => dimension_headers, "metric_headers" => metric_headers, "rows" => rows, "row_count" => row_count, "quota" => quota } end |