Module: Google::Cloud::Talent::V4::JobService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/talent/v4/job_service/paths.rb

Overview

Path helper methods for the JobService API.

Instance Method Summary collapse

Instance Method Details

#company_path(project:, tenant:, company:) ⇒ ::String

Create a fully-qualified Company resource string.

The resource will be in the following format:

projects/{project}/tenants/{tenant}/companies/{company}

Parameters:

  • project (String)
  • tenant (String)
  • company (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/talent/v4/job_service/paths.rb', line 39

def company_path project:, tenant:, company:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"

  "projects/#{project}/tenants/#{tenant}/companies/#{company}"
end

#job_path(project:, tenant:, job:) ⇒ ::String

Create a fully-qualified Job resource string.

The resource will be in the following format:

projects/{project}/tenants/{tenant}/jobs/{job}

Parameters:

  • project (String)
  • tenant (String)
  • job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


58
59
60
61
62
63
# File 'lib/google/cloud/talent/v4/job_service/paths.rb', line 58

def job_path project:, tenant:, job:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"

  "projects/#{project}/tenants/#{tenant}/jobs/#{job}"
end

#tenant_path(project:, tenant:) ⇒ ::String

Create a fully-qualified Tenant resource string.

The resource will be in the following format:

projects/{project}/tenants/{tenant}

Parameters:

  • project (String)
  • tenant (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


76
77
78
79
80
# File 'lib/google/cloud/talent/v4/job_service/paths.rb', line 76

def tenant_path project:, tenant:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/tenants/#{tenant}"
end