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

#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)


37
38
39
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 37

def  account:
  "accounts/#{}"
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)


52
53
54
55
56
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 52

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)


69
70
71
72
73
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 69

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)


86
87
88
89
90
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 86

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)


102
103
104
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 102

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)


116
117
118
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 116

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)


131
132
133
134
135
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 131

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)


148
149
150
151
152
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 148

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)


165
166
167
168
169
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 165

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

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)


182
183
184
185
186
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 182

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)


199
200
201
202
203
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 199

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)


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

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)


232
233
234
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 232

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)


248
249
250
251
252
253
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 248

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)


265
266
267
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 265

def property_path property:
  "properties/#{property}"
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)


289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 289

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