google-cloud-vm_migration-v1 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil
@@ -148,6 +148,29 @@ module Google
148
148
  "projects/#{project}/locations/#{location}/sources/#{source}/migratingVms/#{migrating_vm}"
149
149
  end
150
150
 
151
+ ##
152
+ # Create a fully-qualified ReplicationCycle resource string.
153
+ #
154
+ # The resource will be in the following format:
155
+ #
156
+ # `projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle}`
157
+ #
158
+ # @param project [String]
159
+ # @param location [String]
160
+ # @param source [String]
161
+ # @param migrating_vm [String]
162
+ # @param replication_cycle [String]
163
+ #
164
+ # @return [::String]
165
+ def replication_cycle_path project:, location:, source:, migrating_vm:, replication_cycle:
166
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
167
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
168
+ raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
169
+ raise ::ArgumentError, "migrating_vm cannot contain /" if migrating_vm.to_s.include? "/"
170
+
171
+ "projects/#{project}/locations/#{location}/sources/#{source}/migratingVms/#{migrating_vm}/replicationCycles/#{replication_cycle}"
172
+ end
173
+
151
174
  ##
152
175
  # Create a fully-qualified Source resource string.
153
176
  #