Class: AnalyticsOps::Governance::Snapshot
- Inherits:
-
Object
- Object
- AnalyticsOps::Governance::Snapshot
- Defined in:
- lib/analytics_ops/governance.rb,
sig/analytics_ops.rbs
Overview
Immutable snapshot of experimental governance resources for one property.
Constant Summary collapse
- MAX_RESOURCES =
10_000
Instance Attribute Summary collapse
-
#attribution ⇒ record
readonly
Returns the value of attribute attribution.
-
#bigquery_links ⇒ Array[record]
readonly
Returns the value of attribute bigquery_links.
-
#calculated_metrics ⇒ Array[record]
readonly
Returns the value of attribute calculated_metrics.
-
#channel_groups ⇒ Array[record]
readonly
Returns the value of attribute channel_groups.
-
#event_create_rules ⇒ Array[record]
readonly
Returns the value of attribute event_create_rules.
-
#event_edit_rules ⇒ Array[record]
readonly
Returns the value of attribute event_edit_rules.
-
#property_id ⇒ String
readonly
Returns the value of attribute property_id.
-
#reporting_identity ⇒ record
readonly
Returns the value of attribute reporting_identity.
-
#stream_settings ⇒ Array[StreamSettings]
readonly
Returns the value of attribute stream_settings.
Instance Method Summary collapse
-
#initialize(property_id:, stream_settings:, reporting_identity:, attribution:, channel_groups:, calculated_metrics:, event_create_rules:, event_edit_rules:, bigquery_links:) ⇒ Snapshot
constructor
A new instance of Snapshot.
- #to_h ⇒ record
Constructor Details
#initialize(property_id:, stream_settings:, reporting_identity:, attribution:, channel_groups:, calculated_metrics:, event_create_rules:, event_edit_rules:, bigquery_links:) ⇒ Snapshot
Returns a new instance of Snapshot.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/analytics_ops/governance.rb', line 19 def initialize(property_id:, stream_settings:, reporting_identity:, attribution:, channel_groups:, calculated_metrics:, event_create_rules:, event_edit_rules:, bigquery_links:) validate_property_id!(property_id) validate_streams!(property_id, stream_settings) validate_resources!( reporting_identity, attribution, channel_groups, calculated_metrics, event_create_rules, event_edit_rules, bigquery_links ) @property_id = property_id.dup.freeze @stream_settings = stream_settings.dup.freeze @reporting_identity = Canonical.immutable(reporting_identity) @attribution = Canonical.immutable(attribution) @channel_groups = Canonical.immutable(channel_groups) @calculated_metrics = Canonical.immutable(calculated_metrics) @event_create_rules = Canonical.immutable(event_create_rules) @event_edit_rules = Canonical.immutable(event_edit_rules) @bigquery_links = Canonical.immutable(bigquery_links) freeze end |
Instance Attribute Details
#attribution ⇒ record (readonly)
Returns the value of attribute attribution.
15 16 17 |
# File 'lib/analytics_ops/governance.rb', line 15 def attribution @attribution end |
#bigquery_links ⇒ Array[record] (readonly)
Returns the value of attribute bigquery_links.
15 16 17 |
# File 'lib/analytics_ops/governance.rb', line 15 def bigquery_links @bigquery_links end |
#calculated_metrics ⇒ Array[record] (readonly)
Returns the value of attribute calculated_metrics.
15 16 17 |
# File 'lib/analytics_ops/governance.rb', line 15 def calculated_metrics @calculated_metrics end |
#channel_groups ⇒ Array[record] (readonly)
Returns the value of attribute channel_groups.
15 16 17 |
# File 'lib/analytics_ops/governance.rb', line 15 def channel_groups @channel_groups end |
#event_create_rules ⇒ Array[record] (readonly)
Returns the value of attribute event_create_rules.
15 16 17 |
# File 'lib/analytics_ops/governance.rb', line 15 def event_create_rules @event_create_rules end |
#event_edit_rules ⇒ Array[record] (readonly)
Returns the value of attribute event_edit_rules.
15 16 17 |
# File 'lib/analytics_ops/governance.rb', line 15 def event_edit_rules @event_edit_rules end |
#property_id ⇒ String (readonly)
Returns the value of attribute property_id.
15 16 17 |
# File 'lib/analytics_ops/governance.rb', line 15 def property_id @property_id end |
#reporting_identity ⇒ record (readonly)
Returns the value of attribute reporting_identity.
15 16 17 |
# File 'lib/analytics_ops/governance.rb', line 15 def reporting_identity @reporting_identity end |
#stream_settings ⇒ Array[StreamSettings] (readonly)
Returns the value of attribute stream_settings.
15 16 17 |
# File 'lib/analytics_ops/governance.rb', line 15 def stream_settings @stream_settings end |
Instance Method Details
#to_h ⇒ record
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/analytics_ops/governance.rb', line 46 def to_h { "property_id" => property_id, "stream_settings" => stream_settings.map(&:to_h), "reporting_identity" => reporting_identity, "attribution" => attribution, "channel_groups" => channel_groups, "calculated_metrics" => calculated_metrics, "event_create_rules" => event_create_rules, "event_edit_rules" => event_edit_rules, "bigquery_links" => bigquery_links } end |