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

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


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

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)


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

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)


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

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)


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

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)


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

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

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


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

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

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


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

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)


188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb', line 188

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)


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

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