Module: Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb

Overview

Path helper methods for the AnalyticsAdminService API.

Instance Method Summary collapse

Instance Method Details

#access_binding_path(account: , access_binding: ) ⇒ ::String #access_binding_path(property: , access_binding: ) ⇒ ::String

Create a fully-qualified AccessBinding resource string.

Overloads:

  • #access_binding_path(account: , access_binding: ) ⇒ ::String

    The resource will be in the following format:

    accounts/{account}/accessBindings/{access_binding}

    Parameters:

    • account (String) (defaults to: )
    • access_binding (String) (defaults to: )
  • #access_binding_path(property: , access_binding: ) ⇒ ::String

    The resource will be in the following format:

    properties/{property}/accessBindings/{access_binding}

    Parameters:

    • property (String) (defaults to: )
    • access_binding (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 47

def access_binding_path **args
  resources = {
    "access_binding:account" => (proc do |account:, access_binding:|
      raise ::ArgumentError, "account cannot contain /" if .to_s.include? "/"

      "accounts/#{}/accessBindings/#{access_binding}"
    end),
    "access_binding:property" => (proc do |property:, access_binding:|
      raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

      "properties/#{property}/accessBindings/#{access_binding}"
    end)
  }

  resource = resources[args.keys.sort.join(":")]
  raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
  resource.call(**args)
end

#account_path(account:) ⇒ ::String

Create a fully-qualified Account resource string.

The resource will be in the following format:

accounts/{account}

Parameters:

  • account (String)

Returns:

  • (::String)


76
77
78
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 76

def  account:
  "accounts/#{}"
end

#attribution_settings_path(property:) ⇒ ::String

Create a fully-qualified AttributionSettings resource string.

The resource will be in the following format:

properties/{property}/attributionSettings

Parameters:

  • property (String)

Returns:

  • (::String)


90
91
92
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 90

def attribution_settings_path property:
  "properties/#{property}/attributionSettings"
end

#audience_path(property:, audience:) ⇒ ::String

Create a fully-qualified Audience resource string.

The resource will be in the following format:

properties/{property}/audiences/{audience}

Parameters:

  • property (String)
  • audience (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


105
106
107
108
109
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 105

def audience_path property:, audience:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/audiences/#{audience}"
end

Create a fully-qualified BigQueryLink resource string.

The resource will be in the following format:

properties/{property}/bigQueryLinks/{bigquery_link}

Parameters:

  • property (String)
  • bigquery_link (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


122
123
124
125
126
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 122

def big_query_link_path property:, bigquery_link:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/bigQueryLinks/#{bigquery_link}"
end

#conversion_event_path(property:, conversion_event:) ⇒ ::String

Create a fully-qualified ConversionEvent resource string.

The resource will be in the following format:

properties/{property}/conversionEvents/{conversion_event}

Parameters:

  • property (String)
  • conversion_event (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


139
140
141
142
143
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 139

def conversion_event_path property:, conversion_event:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/conversionEvents/#{conversion_event}"
end

#custom_dimension_path(property:, custom_dimension:) ⇒ ::String

Create a fully-qualified CustomDimension resource string.

The resource will be in the following format:

properties/{property}/customDimensions/{custom_dimension}

Parameters:

  • property (String)
  • custom_dimension (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


156
157
158
159
160
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 156

def custom_dimension_path property:, custom_dimension:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/customDimensions/#{custom_dimension}"
end

#custom_metric_path(property:, custom_metric:) ⇒ ::String

Create a fully-qualified CustomMetric resource string.

The resource will be in the following format:

properties/{property}/customMetrics/{custom_metric}

Parameters:

  • property (String)
  • custom_metric (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


173
174
175
176
177
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 173

def custom_metric_path property:, custom_metric:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/customMetrics/#{custom_metric}"
end

#data_retention_settings_path(property:) ⇒ ::String

Create a fully-qualified DataRetentionSettings resource string.

The resource will be in the following format:

properties/{property}/dataRetentionSettings

Parameters:

  • property (String)

Returns:

  • (::String)


189
190
191
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 189

def data_retention_settings_path property:
  "properties/#{property}/dataRetentionSettings"
end

#data_sharing_settings_path(account:) ⇒ ::String

Create a fully-qualified DataSharingSettings resource string.

The resource will be in the following format:

accounts/{account}/dataSharingSettings

Parameters:

  • account (String)

Returns:

  • (::String)


203
204
205
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 203

def data_sharing_settings_path account:
  "accounts/#{}/dataSharingSettings"
end

#data_stream_path(property:, data_stream:) ⇒ ::String

Create a fully-qualified DataStream resource string.

The resource will be in the following format:

properties/{property}/dataStreams/{data_stream}

Parameters:

  • property (String)
  • data_stream (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


218
219
220
221
222
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 218

def data_stream_path property:, data_stream:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/dataStreams/#{data_stream}"
end

Create a fully-qualified DisplayVideo360AdvertiserLink resource string.

The resource will be in the following format:

properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}

Parameters:

  • property (String)
  • display_video_360_advertiser_link (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


235
236
237
238
239
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 235

def display_video360_advertiser_link_path property:, display_video_360_advertiser_link:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/displayVideo360AdvertiserLinks/#{display_video_360_advertiser_link}"
end

Create a fully-qualified DisplayVideo360AdvertiserLinkProposal resource string.

The resource will be in the following format:

properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}

Parameters:

  • property (String)
  • display_video_360_advertiser_link_proposal (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


252
253
254
255
256
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 252

def display_video360_advertiser_link_proposal_path property:, display_video_360_advertiser_link_proposal:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/displayVideo360AdvertiserLinkProposals/#{display_video_360_advertiser_link_proposal}"
end

#expanded_data_set_path(property:, expanded_data_set:) ⇒ ::String

Create a fully-qualified ExpandedDataSet resource string.

The resource will be in the following format:

properties/{property}/expandedDataSets/{expanded_data_set}

Parameters:

  • property (String)
  • expanded_data_set (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


269
270
271
272
273
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 269

def expanded_data_set_path property:, expanded_data_set:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/expandedDataSets/#{expanded_data_set}"
end

Create a fully-qualified FirebaseLink resource string.

The resource will be in the following format:

properties/{property}/firebaseLinks/{firebase_link}

Parameters:

  • property (String)
  • firebase_link (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


286
287
288
289
290
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 286

def firebase_link_path property:, firebase_link:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/firebaseLinks/#{firebase_link}"
end

#global_site_tag_path(property:, data_stream:) ⇒ ::String

Create a fully-qualified GlobalSiteTag resource string.

The resource will be in the following format:

properties/{property}/dataStreams/{data_stream}/globalSiteTag

Parameters:

  • property (String)
  • data_stream (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


303
304
305
306
307
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 303

def global_site_tag_path property:, data_stream:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/dataStreams/#{data_stream}/globalSiteTag"
end

Create a fully-qualified GoogleAdsLink resource string.

The resource will be in the following format:

properties/{property}/googleAdsLinks/{google_ads_link}

Parameters:

  • property (String)
  • google_ads_link (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


320
321
322
323
324
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 320

def google_ads_link_path property:, google_ads_link:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/googleAdsLinks/#{google_ads_link}"
end

#google_signals_settings_path(property:) ⇒ ::String

Create a fully-qualified GoogleSignalsSettings resource string.

The resource will be in the following format:

properties/{property}/googleSignalsSettings

Parameters:

  • property (String)

Returns:

  • (::String)


336
337
338
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 336

def google_signals_settings_path property:
  "properties/#{property}/googleSignalsSettings"
end

#measurement_protocol_secret_path(property:, data_stream:, measurement_protocol_secret:) ⇒ ::String

Create a fully-qualified MeasurementProtocolSecret resource string.

The resource will be in the following format:

properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}

Parameters:

  • property (String)
  • data_stream (String)
  • measurement_protocol_secret (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


352
353
354
355
356
357
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 352

def measurement_protocol_secret_path property:, data_stream:, measurement_protocol_secret:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"
  raise ::ArgumentError, "data_stream cannot contain /" if data_stream.to_s.include? "/"

  "properties/#{property}/dataStreams/#{data_stream}/measurementProtocolSecrets/#{measurement_protocol_secret}"
end

#property_path(property:) ⇒ ::String

Create a fully-qualified Property resource string.

The resource will be in the following format:

properties/{property}

Parameters:

  • property (String)

Returns:

  • (::String)


369
370
371
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 369

def property_path property:
  "properties/#{property}"
end

Create a fully-qualified SearchAds360Link resource string.

The resource will be in the following format:

properties/{property}/searchAds360Links/{search_ads_360_link}

Parameters:

  • property (String)
  • search_ads_360_link (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


384
385
386
387
388
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 384

def search_ads360_link_path property:, search_ads_360_link:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/searchAds360Links/#{search_ads_360_link}"
end

Create a fully-qualified UserLink resource string.

Overloads:

  • #user_link_path(account: , user_link: ) ⇒ ::String

    The resource will be in the following format:

    accounts/{account}/userLinks/{user_link}

    Parameters:

    • account (String) (defaults to: )
    • user_link (String) (defaults to: )
  • #user_link_path(property: , user_link: ) ⇒ ::String

    The resource will be in the following format:

    properties/{property}/userLinks/{user_link}

    Parameters:

    • property (String) (defaults to: )
    • user_link (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 410

def user_link_path **args
  resources = {
    "account:user_link" => (proc do |account:, user_link:|
      raise ::ArgumentError, "account cannot contain /" if .to_s.include? "/"

      "accounts/#{}/userLinks/#{user_link}"
    end),
    "property:user_link" => (proc do |property:, user_link:|
      raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

      "properties/#{property}/userLinks/#{user_link}"
    end)
  }

  resource = resources[args.keys.sort.join(":")]
  raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
  resource.call(**args)
end