lib/google/cloud/metastore/v1beta/dataproc_metastore/paths.rb in google-cloud-metastore-v1beta-0.2.0 vs lib/google/cloud/metastore/v1beta/dataproc_metastore/paths.rb in google-cloud-metastore-v1beta-0.3.0

- old
+ new

@@ -44,10 +44,29 @@ "projects/#{project}/locations/#{location}/services/#{service}/backups/#{backup}" end ## + # Create a fully-qualified Lake resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # + # @return [::String] + def lake_path project:, location:, lake: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}" + end + + ## # Create a fully-qualified Location resource string. # # The resource will be in the following format: # # `projects/{project}/locations/{location}` @@ -115,9 +134,28 @@ def service_path project:, location:, service: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/services/#{service}" + end + + ## + # Create a fully-qualified Subnetwork resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/subnetworks/{subnetwork}` + # + # @param project [String] + # @param region [String] + # @param subnetwork [String] + # + # @return [::String] + def subnetwork_path project:, region:, subnetwork: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}" end extend self end end