Module: Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb
Overview
Path helper methods for the BigQueryRead API.
Instance Method Summary collapse
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
-
#read_session_path(project:, location:, session:) ⇒ ::String
Create a fully-qualified ReadSession resource string.
-
#read_stream_path(project:, location:, session:, stream:) ⇒ ::String
Create a fully-qualified ReadStream resource string.
-
#table_path(project:, dataset:, table:) ⇒ ::String
Create a fully-qualified Table resource string.
Instance Method Details
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
The resource will be in the following format:
projects/{project}
38 39 40 |
# File 'lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb', line 38 def project_path project: "projects/#{project}" end |
#read_session_path(project:, location:, session:) ⇒ ::String
Create a fully-qualified ReadSession resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/sessions/{session}
54 55 56 57 58 59 |
# File 'lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb', line 54 def read_session_path project:, location:, session: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/sessions/#{session}" end |
#read_stream_path(project:, location:, session:, stream:) ⇒ ::String
Create a fully-qualified ReadStream resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/sessions/{session}/streams/{stream}
74 75 76 77 78 79 80 |
# File 'lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb', line 74 def read_stream_path project:, location:, session:, stream: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" "projects/#{project}/locations/#{location}/sessions/#{session}/streams/#{stream}" end |
#table_path(project:, dataset:, table:) ⇒ ::String
Create a fully-qualified Table resource string.
The resource will be in the following format:
projects/{project}/datasets/{dataset}/tables/{table}
94 95 96 97 98 99 |
# File 'lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb', line 94 def table_path project:, dataset:, table: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" "projects/#{project}/datasets/#{dataset}/tables/#{table}" end |