Module: Google::Area120::Tables::V1alpha1::TablesService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/area120/tables/v1alpha1/tables_service/paths.rb

Overview

Path helper methods for the TablesService API.

Instance Method Summary collapse

Instance Method Details

#row_path(table:, row:) ⇒ ::String

Create a fully-qualified Row resource string.

The resource will be in the following format:

tables/{table}/rows/{row}

Parameters:

  • table (String)
  • row (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


38
39
40
41
42
# File 'lib/google/area120/tables/v1alpha1/tables_service/paths.rb', line 38

def row_path table:, row:
  raise ::ArgumentError, "table cannot contain /" if table.to_s.include? "/"

  "tables/#{table}/rows/#{row}"
end

#table_path(table:) ⇒ ::String

Create a fully-qualified Table resource string.

The resource will be in the following format:

tables/{table}

Parameters:

  • table (String)

Returns:

  • (::String)


54
55
56
# File 'lib/google/area120/tables/v1alpha1/tables_service/paths.rb', line 54

def table_path table:
  "tables/#{table}"
end

#workspace_path(workspace:) ⇒ ::String

Create a fully-qualified Workspace resource string.

The resource will be in the following format:

workspaces/{workspace}

Parameters:

  • workspace (String)

Returns:

  • (::String)


68
69
70
# File 'lib/google/area120/tables/v1alpha1/tables_service/paths.rb', line 68

def workspace_path workspace:
  "workspaces/#{workspace}"
end