Module: Google::Cloud::Bigquery::Reservation::V1::ReservationService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb

Overview

Path helper methods for the ReservationService API.

Instance Method Summary collapse

Instance Method Details

#assignment_path(project:, location:, reservation:, assignment:) ⇒ ::String

Create a fully-qualified Assignment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}

Parameters:

  • project (String)
  • location (String)
  • reservation (String)
  • assignment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


41
42
43
44
45
46
47
# File 'lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb', line 41

def assignment_path project:, location:, reservation:, assignment:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "reservation cannot contain /" if reservation.to_s.include? "/"

  "projects/#{project}/locations/#{location}/reservations/#{reservation}/assignments/#{assignment}"
end

#bi_reservation_path(project:, location:) ⇒ ::String

Create a fully-qualified BiReservation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/biReservation

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


60
61
62
63
64
# File 'lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb', line 60

def bi_reservation_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}/biReservation"
end

#capacity_commitment_path(project:, location:, capacity_commitment:) ⇒ ::String

Create a fully-qualified CapacityCommitment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}

Parameters:

  • project (String)
  • location (String)
  • capacity_commitment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


78
79
80
81
82
83
# File 'lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb', line 78

def capacity_commitment_path project:, location:, capacity_commitment:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/capacityCommitments/#{capacity_commitment}"
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}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


96
97
98
99
100
# File 'lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb', line 96

def location_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}"
end

#reservation_path(project:, location:, reservation:) ⇒ ::String

Create a fully-qualified Reservation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/reservations/{reservation}

Parameters:

  • project (String)
  • location (String)
  • reservation (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


114
115
116
117
118
119
# File 'lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb', line 114

def reservation_path project:, location:, reservation:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/reservations/#{reservation}"
end