google-cloud-bigquery-analytics_hub-v1 0.2.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -99,6 +99,25 @@ module Google
99
99
  "projects/#{project}/locations/#{location}"
100
100
  end
101
101
 
102
+ ##
103
+ # Create a fully-qualified Subscription resource string.
104
+ #
105
+ # The resource will be in the following format:
106
+ #
107
+ # `projects/{project}/locations/{location}/subscriptions/{subscription}`
108
+ #
109
+ # @param project [String]
110
+ # @param location [String]
111
+ # @param subscription [String]
112
+ #
113
+ # @return [::String]
114
+ def subscription_path project:, location:, subscription:
115
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
116
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
117
+
118
+ "projects/#{project}/locations/#{location}/subscriptions/#{subscription}"
119
+ end
120
+
102
121
  extend self
103
122
  end
104
123
  end