Module: Google::Cloud::ApiHub::V1::ApiHubPlugin::Paths
- Extended by:
- Paths
- Included in:
- Paths, Rest::Client
- Defined in:
- lib/google/cloud/api_hub/v1/api_hub_plugin/paths.rb
Overview
Path helper methods for the ApiHubPlugin API.
Instance Method Summary collapse
-
#attribute_path(project:, location:, attribute:) ⇒ ::String
Create a fully-qualified Attribute resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#plugin_instance_path(project:, location:, plugin:, instance:) ⇒ ::String
Create a fully-qualified PluginInstance resource string.
-
#plugin_path(project:, location:, plugin:) ⇒ ::String
Create a fully-qualified Plugin resource string.
-
#service_account_path(project:, service_account:) ⇒ ::String
Create a fully-qualified ServiceAccount resource string.
Instance Method Details
#attribute_path(project:, location:, attribute:) ⇒ ::String
Create a fully-qualified Attribute resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/attributes/{attribute}
39 40 41 42 43 44 |
# File 'lib/google/cloud/api_hub/v1/api_hub_plugin/paths.rb', line 39 def attribute_path project:, location:, attribute: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/attributes/#{attribute}" end |
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
57 58 59 60 61 |
# File 'lib/google/cloud/api_hub/v1/api_hub_plugin/paths.rb', line 57 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#plugin_instance_path(project:, location:, plugin:, instance:) ⇒ ::String
Create a fully-qualified PluginInstance resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
95 96 97 98 99 100 101 |
# File 'lib/google/cloud/api_hub/v1/api_hub_plugin/paths.rb', line 95 def plugin_instance_path project:, location:, plugin:, instance: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "plugin cannot contain /" if plugin.to_s.include? "/" "projects/#{project}/locations/#{location}/plugins/#{plugin}/instances/#{instance}" end |
#plugin_path(project:, location:, plugin:) ⇒ ::String
Create a fully-qualified Plugin resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/plugins/{plugin}
75 76 77 78 79 80 |
# File 'lib/google/cloud/api_hub/v1/api_hub_plugin/paths.rb', line 75 def plugin_path project:, location:, plugin: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/plugins/#{plugin}" end |
#service_account_path(project:, service_account:) ⇒ ::String
Create a fully-qualified ServiceAccount resource string.
The resource will be in the following format:
projects/{project}/serviceAccounts/{service_account}
114 115 116 117 118 |
# File 'lib/google/cloud/api_hub/v1/api_hub_plugin/paths.rb', line 114 def service_account_path project:, service_account: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/serviceAccounts/#{service_account}" end |