lib/google/cloud/tpu/v1/tpu/client.rb in google-cloud-tpu-v1-0.3.0 vs lib/google/cloud/tpu/v1/tpu/client.rb in google-cloud-tpu-v1-0.4.0

- old
+ new

@@ -218,17 +218,15 @@ # request = Google::Cloud::Tpu::V1::ListNodesRequest.new # # # Call the list_nodes method. # result = client.list_nodes request # - # # The returned object is of type Gapic::PagedEnumerable. You can - # # iterate over all elements by calling #each, and the enumerable - # # will lazily make API calls to fetch subsequent pages. Other - # # methods are also available for managing paging directly. - # result.each do |response| + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| # # Each element is of type ::Google::Cloud::Tpu::V1::Node. - # p response + # p item # end # def list_nodes request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -399,18 +397,18 @@ # request = Google::Cloud::Tpu::V1::CreateNodeRequest.new # # # Call the create_node method. # result = client.create_node request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def create_node request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -492,18 +490,18 @@ # request = Google::Cloud::Tpu::V1::DeleteNodeRequest.new # # # Call the delete_node method. # result = client.delete_node request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def delete_node request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -587,18 +585,18 @@ # request = Google::Cloud::Tpu::V1::ReimageNodeRequest.new # # # Call the reimage_node method. # result = client.reimage_node request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def reimage_node request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -680,18 +678,18 @@ # request = Google::Cloud::Tpu::V1::StopNodeRequest.new # # # Call the stop_node method. # result = client.stop_node request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def stop_node request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -773,18 +771,18 @@ # request = Google::Cloud::Tpu::V1::StartNodeRequest.new # # # Call the start_node method. # result = client.start_node request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def start_node request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -874,17 +872,15 @@ # request = Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.new # # # Call the list_tensor_flow_versions method. # result = client.list_tensor_flow_versions request # - # # The returned object is of type Gapic::PagedEnumerable. You can - # # iterate over all elements by calling #each, and the enumerable - # # will lazily make API calls to fetch subsequent pages. Other - # # methods are also available for managing paging directly. - # result.each do |response| + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| # # Each element is of type ::Google::Cloud::Tpu::V1::TensorFlowVersion. - # p response + # p item # end # def list_tensor_flow_versions request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1059,17 +1055,15 @@ # request = Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.new # # # Call the list_accelerator_types method. # result = client.list_accelerator_types request # - # # The returned object is of type Gapic::PagedEnumerable. You can - # # iterate over all elements by calling #each, and the enumerable - # # will lazily make API calls to fetch subsequent pages. Other - # # methods are also available for managing paging directly. - # result.each do |response| + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| # # Each element is of type ::Google::Cloud::Tpu::V1::AcceleratorType. - # p response + # p item # end # def list_accelerator_types request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1233,12 +1227,12 @@ # @!attribute [rw] credentials # Credentials to send with calls. You may provide any of the following types: # * (`String`) The path to a service account key file in JSON format # * (`Hash`) A service account key as a Hash # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html)) + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html)) + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) # * (`GRPC::Core::Channel`) a gRPC channel with included credentials # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object # * (`nil`) indicating no credentials # @return [::Object] # @!attribute [rw] scope