google-cloud-deploy-v1 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -620,9 +620,9 @@ module Google
620
620
  # * (`String`) The path to a service account key file in JSON format
621
621
  # * (`Hash`) A service account key as a Hash
622
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
623
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
624
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
625
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
626
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
627
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
628
628
  # * (`nil`) indicating no credentials
@@ -203,6 +203,25 @@ module Google
203
203
  "projects/#{project}/locations/#{location}/deliveryPipelines/#{delivery_pipeline}/releases/#{release}/rollouts/#{rollout}"
204
204
  end
205
205
 
206
+ ##
207
+ # Create a fully-qualified Service resource string.
208
+ #
209
+ # The resource will be in the following format:
210
+ #
211
+ # `projects/{project}/locations/{location}/services/{service}`
212
+ #
213
+ # @param project [String]
214
+ # @param location [String]
215
+ # @param service [String]
216
+ #
217
+ # @return [::String]
218
+ def service_path project:, location:, service:
219
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
220
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
221
+
222
+ "projects/#{project}/locations/#{location}/services/#{service}"
223
+ end
224
+
206
225
  ##
207
226
  # Create a fully-qualified Target resource string.
208
227
  #