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/#{account}"
end

#android_app_data_stream_path(property:, android_app_data_stream:) ⇒ ::String

Create a fully-qualified AndroidAppDataStream resource string.

The resource will be in the following format:

properties/{property}/androidAppDataStreams/{android_app_data_stream}

Parameters:

  • property (String)
  • android_app_data_stream (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def android_app_data_stream_path property:, android_app_data_stream:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/androidAppDataStreams/#{android_app_data_stream}"
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)


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

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:) ⇒ ::String

Create a fully-qualified CustomDimension resource string.

The resource will be in the following format:

properties/{property}/customDimensions

Parameters:

  • property (String)

Returns:

  • (::String)


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

def custom_dimension_path property:
  "properties/#{property}/customDimensions"
end

#custom_metric_path(property:) ⇒ ::String

Create a fully-qualified CustomMetric resource string.

The resource will be in the following format:

properties/{property}/customMetrics

Parameters:

  • property (String)

Returns:

  • (::String)


99
100
101
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 99

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


113
114
115
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 113

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

#enhanced_measurement_settings_path(property:, web_data_stream:) ⇒ ::String

Create a fully-qualified EnhancedMeasurementSettings resource string.

The resource will be in the following format:

properties/{property}/webDataStreams/{web_data_stream}/enhancedMeasurementSettings

Parameters:

  • property (String)
  • web_data_stream (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


128
129
130
131
132
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 128

def enhanced_measurement_settings_path property:, web_data_stream:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/webDataStreams/#{web_data_stream}/enhancedMeasurementSettings"
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)


145
146
147
148
149
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 145

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:) ⇒ ::String

Create a fully-qualified GlobalSiteTag resource string.

The resource will be in the following format:

properties/{property}/globalSiteTag

Parameters:

  • property (String)

Returns:

  • (::String)


161
162
163
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 161

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


176
177
178
179
180
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 176

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)


192
193
194
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 192

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

#ios_app_data_stream_path(property:, ios_app_data_stream:) ⇒ ::String

Create a fully-qualified IosAppDataStream resource string.

The resource will be in the following format:

properties/{property}/iosAppDataStreams/{ios_app_data_stream}

Parameters:

  • property (String)
  • ios_app_data_stream (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


207
208
209
210
211
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 207

def ios_app_data_stream_path property:, ios_app_data_stream:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/iosAppDataStreams/#{ios_app_data_stream}"
end

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

Create a fully-qualified MeasurementProtocolSecret resource string.

The resource will be in the following format:

properties/{property}/webDataStreams/{web_data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}

Parameters:

  • property (String)
  • web_data_stream (String)
  • measurement_protocol_secret (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


225
226
227
228
229
230
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 225

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

  "properties/#{property}/webDataStreams/#{web_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)


242
243
244
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 242

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)
    • user_link (String)
  • #user_link_path(property:, user_link:) ⇒ ::String

    The resource will be in the following format:

    properties/{property}/userLinks/{user_link}

    Parameters:

    • property (String)
    • user_link (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 266

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

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

#web_data_stream_path(property:, web_data_stream:) ⇒ ::String

Create a fully-qualified WebDataStream resource string.

The resource will be in the following format:

properties/{property}/webDataStreams/{web_data_stream}

Parameters:

  • property (String)
  • web_data_stream (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


296
297
298
299
300
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 296

def web_data_stream_path property:, web_data_stream:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/webDataStreams/#{web_data_stream}"
end