lib/google/cloud/dataproc/v1/cluster_controller/paths.rb in google-cloud-dataproc-v1-0.13.0 vs lib/google/cloud/dataproc/v1/cluster_controller/paths.rb in google-cloud-dataproc-v1-0.14.0

- old
+ new

@@ -23,9 +23,30 @@ module V1 module ClusterController # Path helper methods for the ClusterController API. module Paths ## + # Create a fully-qualified NodeGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}` + # + # @param project [String] + # @param region [String] + # @param cluster [String] + # @param node_group [String] + # + # @return [::String] + def node_group_path project:, region:, cluster:, node_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + raise ::ArgumentError, "cluster cannot contain /" if cluster.to_s.include? "/" + + "projects/#{project}/regions/#{region}/clusters/#{cluster}/nodeGroups/#{node_group}" + end + + ## # Create a fully-qualified Service resource string. # # The resource will be in the following format: # # `projects/{project}/locations/{location}/services/{service}`