google-cloud-tpu-v1 0.1.0 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.yardopts +1 -1
 - data/AUTHENTICATION.md +15 -33
 - data/README.md +1 -1
 - data/lib/google/cloud/tpu/v1/cloud_tpu_pb.rb +2 -2
 - data/lib/google/cloud/tpu/v1/cloud_tpu_services_pb.rb +1 -1
 - data/lib/google/cloud/tpu/v1/tpu/client.rb +337 -81
 - data/lib/google/cloud/tpu/v1/tpu/operations.rb +146 -34
 - data/lib/google/cloud/tpu/v1/version.rb +1 -1
 - data/proto_docs/google/api/field_behavior.rb +6 -0
 - data/proto_docs/google/api/resource.rb +10 -71
 - metadata +5 -5
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 19228445da21345af629398f22c9c0248cd626f0d1d5f68de84cede2067e37bb
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: b9b7fde0bbed321cd9163e5f52b260d3a1f6e03c060431f39bec173403733e91
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: beca189a6c6e93540f723c2766e6b49ace8e08a2e3673fb237e4b83ea34b0c491311b489b7ff2da12014f8ac19862ec885b8c6f0df72620c57803cdf5d114934
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 21e7d765ddffcd0bd1d5d5203bb697413f6a5559fff6528461f410e8e47e776f6ee2c734820838f31cb6fd259430128f9f4e5acbb264cfc04ce81b3bb392969b
         
     | 
    
        data/.yardopts
    CHANGED
    
    
    
        data/AUTHENTICATION.md
    CHANGED
    
    | 
         @@ -66,11 +66,11 @@ The environment variables that google-cloud-tpu-v1 
     | 
|
| 
       66 
66 
     | 
    
         
             
            checks for credentials are configured on the service Credentials class (such as
         
     | 
| 
       67 
67 
     | 
    
         
             
            {::Google::Cloud::Tpu::V1::Tpu::Credentials}):
         
     | 
| 
       68 
68 
     | 
    
         | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
      
 69 
     | 
    
         
            +
            * `CLOUD_TPU_CREDENTIALS` - Path to JSON file, or JSON contents
         
     | 
| 
      
 70 
     | 
    
         
            +
            * `CLOUD_TPU_KEYFILE` - Path to JSON file, or JSON contents
         
     | 
| 
      
 71 
     | 
    
         
            +
            * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
         
     | 
| 
      
 72 
     | 
    
         
            +
            * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
         
     | 
| 
      
 73 
     | 
    
         
            +
            * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
         
     | 
| 
       74 
74 
     | 
    
         | 
| 
       75 
75 
     | 
    
         
             
            ```ruby
         
     | 
| 
       76 
76 
     | 
    
         
             
            require "google/cloud/tpu/v1"
         
     | 
| 
         @@ -82,8 +82,8 @@ client = ::Google::Cloud::Tpu::V1::Tpu::Client.new 
     | 
|
| 
       82 
82 
     | 
    
         | 
| 
       83 
83 
     | 
    
         
             
            ### Configuration
         
     | 
| 
       84 
84 
     | 
    
         | 
| 
       85 
     | 
    
         
            -
            The **Credentials JSON** can be configured instead of  
     | 
| 
       86 
     | 
    
         
            -
            environment  
     | 
| 
      
 85 
     | 
    
         
            +
            The path to the **Credentials JSON** file can be configured instead of storing
         
     | 
| 
      
 86 
     | 
    
         
            +
            it in an environment variable. Either on an individual client initialization:
         
     | 
| 
       87 
87 
     | 
    
         | 
| 
       88 
88 
     | 
    
         
             
            ```ruby
         
     | 
| 
       89 
89 
     | 
    
         
             
            require "google/cloud/tpu/v1"
         
     | 
| 
         @@ -93,7 +93,7 @@ client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| 
     | 
|
| 
       93 
93 
     | 
    
         
             
            end
         
     | 
| 
       94 
94 
     | 
    
         
             
            ```
         
     | 
| 
       95 
95 
     | 
    
         | 
| 
       96 
     | 
    
         
            -
            Or  
     | 
| 
      
 96 
     | 
    
         
            +
            Or globally for all clients:
         
     | 
| 
       97 
97 
     | 
    
         | 
| 
       98 
98 
     | 
    
         
             
            ```ruby
         
     | 
| 
       99 
99 
     | 
    
         
             
            require "google/cloud/tpu/v1"
         
     | 
| 
         @@ -120,15 +120,6 @@ To configure your system for this, simply: 
     | 
|
| 
       120 
120 
     | 
    
         
             
            **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
         
     | 
| 
       121 
121 
     | 
    
         
             
            *should* only be used during development.
         
     | 
| 
       122 
122 
     | 
    
         | 
| 
       123 
     | 
    
         
            -
            [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
         
     | 
| 
       124 
     | 
    
         
            -
            [dev-console]: https://console.cloud.google.com/project
         
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
            [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
         
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
            [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
         
     | 
| 
       129 
     | 
    
         
            -
            [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
         
     | 
| 
       130 
     | 
    
         
            -
            [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
         
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
123 
     | 
    
         
             
            ## Creating a Service Account
         
     | 
| 
       133 
124 
     | 
    
         | 
| 
       134 
125 
     | 
    
         
             
            Google Cloud requires **Service Account Credentials** to
         
     | 
| 
         @@ -139,31 +130,22 @@ If you are not running this client within 
     | 
|
| 
       139 
130 
     | 
    
         
             
            [Google Cloud Platform environments](#google-cloud-platform-environments), you
         
     | 
| 
       140 
131 
     | 
    
         
             
            need a Google Developers service account.
         
     | 
| 
       141 
132 
     | 
    
         | 
| 
       142 
     | 
    
         
            -
            1. Visit the [Google  
     | 
| 
      
 133 
     | 
    
         
            +
            1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
         
     | 
| 
       143 
134 
     | 
    
         
             
            2. Create a new project or click on an existing project.
         
     | 
| 
       144 
     | 
    
         
            -
            3. Activate the  
     | 
| 
      
 135 
     | 
    
         
            +
            3. Activate the menu in the upper left and select **APIs & Services**. From
         
     | 
| 
       145 
136 
     | 
    
         
             
               here, you will enable the APIs that your application requires.
         
     | 
| 
       146 
137 
     | 
    
         | 
| 
       147 
     | 
    
         
            -
               ![Enable the APIs that your application requires][enable-apis]
         
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
138 
     | 
    
         
             
               *Note: You may need to enable billing in order to use these services.*
         
     | 
| 
       150 
139 
     | 
    
         | 
| 
       151 
140 
     | 
    
         
             
            4. Select **Credentials** from the side navigation.
         
     | 
| 
       152 
141 
     | 
    
         | 
| 
       153 
     | 
    
         
            -
                
     | 
| 
       154 
     | 
    
         
            -
             
     | 
| 
       155 
     | 
    
         
            -
               ![Create a new service account][create-new-service-account]
         
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
               ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
         
     | 
| 
       158 
     | 
    
         
            -
             
     | 
| 
       159 
     | 
    
         
            -
               Find the "Add credentials" drop down and select "Service account" to be
         
     | 
| 
       160 
     | 
    
         
            -
               guided through downloading a new JSON key file.
         
     | 
| 
      
 142 
     | 
    
         
            +
               Find the "Create credentials" drop down near the top of the page, and select
         
     | 
| 
      
 143 
     | 
    
         
            +
               "Service account" to be guided through downloading a new JSON key file.
         
     | 
| 
       161 
144 
     | 
    
         | 
| 
       162 
145 
     | 
    
         
             
               If you want to re-use an existing service account, you can easily generate a
         
     | 
| 
       163 
     | 
    
         
            -
               new key file. Just select the account you wish to re-use,  
     | 
| 
       164 
     | 
    
         
            -
                
     | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
       166 
     | 
    
         
            -
               ![Re-use an existing service account][reuse-service-account]
         
     | 
| 
      
 146 
     | 
    
         
            +
               new key file. Just select the account you wish to re-use, click the pencil
         
     | 
| 
      
 147 
     | 
    
         
            +
               tool on the right side to edit the service account, select the **Keys** tab,
         
     | 
| 
      
 148 
     | 
    
         
            +
               and then select **Add Key**.
         
     | 
| 
       167 
149 
     | 
    
         | 
| 
       168 
150 
     | 
    
         
             
               The key file you download will be used by this library to authenticate API
         
     | 
| 
       169 
151 
     | 
    
         
             
               requests and should be stored in a secure location.
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps: 
     | 
|
| 
       33 
33 
     | 
    
         
             
            require "google/cloud/tpu/v1"
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
            client = ::Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
       36 
     | 
    
         
            -
            request =  
     | 
| 
      
 36 
     | 
    
         
            +
            request = ::Google::Cloud::Tpu::V1::ListNodesRequest.new # (request fields as keyword arguments...)
         
     | 
| 
       37 
37 
     | 
    
         
             
            response = client.list_nodes request
         
     | 
| 
       38 
38 
     | 
    
         
             
            ```
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Generated by the protocol buffer compiler.  DO NOT EDIT!
         
     | 
| 
       2 
2 
     | 
    
         
             
            # source: google/cloud/tpu/v1/cloud_tpu.proto
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
     | 
    
         
            -
            require 'google/protobuf'
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
4 
     | 
    
         
             
            require 'google/api/annotations_pb'
         
     | 
| 
       7 
5 
     | 
    
         
             
            require 'google/api/client_pb'
         
     | 
| 
       8 
6 
     | 
    
         
             
            require 'google/api/field_behavior_pb'
         
     | 
| 
       9 
7 
     | 
    
         
             
            require 'google/api/resource_pb'
         
     | 
| 
       10 
8 
     | 
    
         
             
            require 'google/longrunning/operations_pb'
         
     | 
| 
       11 
9 
     | 
    
         
             
            require 'google/protobuf/timestamp_pb'
         
     | 
| 
      
 10 
     | 
    
         
            +
            require 'google/protobuf'
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
       12 
12 
     | 
    
         
             
            Google::Protobuf::DescriptorPool.generated_pool.build do
         
     | 
| 
       13 
13 
     | 
    
         
             
              add_file("google/cloud/tpu/v1/cloud_tpu.proto", :syntax => :proto3) do
         
     | 
| 
       14 
14 
     | 
    
         
             
                add_message "google.cloud.tpu.v1.SchedulingConfig" do
         
     | 
| 
         @@ -43,13 +43,12 @@ module Google 
     | 
|
| 
       43 
43 
     | 
    
         
             
                        # See {::Google::Cloud::Tpu::V1::Tpu::Client::Configuration}
         
     | 
| 
       44 
44 
     | 
    
         
             
                        # for a description of the configuration fields.
         
     | 
| 
       45 
45 
     | 
    
         
             
                        #
         
     | 
| 
       46 
     | 
    
         
            -
                        #  
     | 
| 
      
 46 
     | 
    
         
            +
                        # @example
         
     | 
| 
       47 
47 
     | 
    
         
             
                        #
         
     | 
| 
       48 
     | 
    
         
            -
                        #  
     | 
| 
       49 
     | 
    
         
            -
                        #
         
     | 
| 
       50 
     | 
    
         
            -
                        #      
     | 
| 
       51 
     | 
    
         
            -
                        # 
     | 
| 
       52 
     | 
    
         
            -
                        #     end
         
     | 
| 
      
 48 
     | 
    
         
            +
                        #   # Modify the configuration for all Tpu clients
         
     | 
| 
      
 49 
     | 
    
         
            +
                        #   ::Google::Cloud::Tpu::V1::Tpu::Client.configure do |config|
         
     | 
| 
      
 50 
     | 
    
         
            +
                        #     config.timeout = 10.0
         
     | 
| 
      
 51 
     | 
    
         
            +
                        #   end
         
     | 
| 
       53 
52 
     | 
    
         
             
                        #
         
     | 
| 
       54 
53 
     | 
    
         
             
                        # @yield [config] Configure the Client client.
         
     | 
| 
       55 
54 
     | 
    
         
             
                        # @yieldparam config [Client::Configuration]
         
     | 
| 
         @@ -98,19 +97,15 @@ module Google 
     | 
|
| 
       98 
97 
     | 
    
         
             
                        ##
         
     | 
| 
       99 
98 
     | 
    
         
             
                        # Create a new Tpu client object.
         
     | 
| 
       100 
99 
     | 
    
         
             
                        #
         
     | 
| 
       101 
     | 
    
         
            -
                        #  
     | 
| 
       102 
     | 
    
         
            -
                        #
         
     | 
| 
       103 
     | 
    
         
            -
                        # To create a new Tpu client with the default
         
     | 
| 
       104 
     | 
    
         
            -
                        # configuration:
         
     | 
| 
       105 
     | 
    
         
            -
                        #
         
     | 
| 
       106 
     | 
    
         
            -
                        #     client = ::Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 100 
     | 
    
         
            +
                        # @example
         
     | 
| 
       107 
101 
     | 
    
         
             
                        #
         
     | 
| 
       108 
     | 
    
         
            -
                        #  
     | 
| 
       109 
     | 
    
         
            -
                        #  
     | 
| 
      
 102 
     | 
    
         
            +
                        #   # Create a client using the default configuration
         
     | 
| 
      
 103 
     | 
    
         
            +
                        #   client = ::Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
       110 
104 
     | 
    
         
             
                        #
         
     | 
| 
       111 
     | 
    
         
            -
                        # 
     | 
| 
       112 
     | 
    
         
            -
                        # 
     | 
| 
       113 
     | 
    
         
            -
                        #      
     | 
| 
      
 105 
     | 
    
         
            +
                        #   # Create a client using a custom configuration
         
     | 
| 
      
 106 
     | 
    
         
            +
                        #   client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config|
         
     | 
| 
      
 107 
     | 
    
         
            +
                        #     config.timeout = 10.0
         
     | 
| 
      
 108 
     | 
    
         
            +
                        #   end
         
     | 
| 
       114 
109 
     | 
    
         
             
                        #
         
     | 
| 
       115 
110 
     | 
    
         
             
                        # @yield [config] Configure the Tpu client.
         
     | 
| 
       116 
111 
     | 
    
         
             
                        # @yieldparam config [Client::Configuration]
         
     | 
| 
         @@ -130,14 +125,13 @@ module Google 
     | 
|
| 
       130 
125 
     | 
    
         | 
| 
       131 
126 
     | 
    
         
             
                          # Create credentials
         
     | 
| 
       132 
127 
     | 
    
         
             
                          credentials = @config.credentials
         
     | 
| 
       133 
     | 
    
         
            -
                          # Use self-signed JWT if the  
     | 
| 
      
 128 
     | 
    
         
            +
                          # Use self-signed JWT if the endpoint is unchanged from default,
         
     | 
| 
       134 
129 
     | 
    
         
             
                          # but only if the default endpoint does not have a region prefix.
         
     | 
| 
       135 
     | 
    
         
            -
                          enable_self_signed_jwt = @config. 
     | 
| 
       136 
     | 
    
         
            -
                                                   @config.endpoint == Client.configure.endpoint &&
         
     | 
| 
      
 130 
     | 
    
         
            +
                          enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
         
     | 
| 
       137 
131 
     | 
    
         
             
                                                   !@config.endpoint.split(".").first.include?("-")
         
     | 
| 
       138 
132 
     | 
    
         
             
                          credentials ||= Credentials.default scope: @config.scope,
         
     | 
| 
       139 
133 
     | 
    
         
             
                                                              enable_self_signed_jwt: enable_self_signed_jwt
         
     | 
| 
       140 
     | 
    
         
            -
                          if credentials.is_a?(String) || credentials.is_a?(Hash)
         
     | 
| 
      
 134 
     | 
    
         
            +
                          if credentials.is_a?(::String) || credentials.is_a?(::Hash)
         
     | 
| 
       141 
135 
     | 
    
         
             
                            credentials = Credentials.new credentials, scope: @config.scope
         
     | 
| 
       142 
136 
     | 
    
         
             
                          end
         
     | 
| 
       143 
137 
     | 
    
         
             
                          @quota_project_id = @config.quota_project
         
     | 
| 
         @@ -145,6 +139,7 @@ module Google 
     | 
|
| 
       145 
139 
     | 
    
         | 
| 
       146 
140 
     | 
    
         
             
                          @operations_client = Operations.new do |config|
         
     | 
| 
       147 
141 
     | 
    
         
             
                            config.credentials = credentials
         
     | 
| 
      
 142 
     | 
    
         
            +
                            config.quota_project = @quota_project_id
         
     | 
| 
       148 
143 
     | 
    
         
             
                            config.endpoint = @config.endpoint
         
     | 
| 
       149 
144 
     | 
    
         
             
                          end
         
     | 
| 
       150 
145 
     | 
    
         | 
| 
         @@ -199,6 +194,27 @@ module Google 
     | 
|
| 
       199 
194 
     | 
    
         
             
                        #
         
     | 
| 
       200 
195 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       201 
196 
     | 
    
         
             
                        #
         
     | 
| 
      
 197 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 198 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 199 
     | 
    
         
            +
                        #
         
     | 
| 
      
 200 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 201 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 202 
     | 
    
         
            +
                        #
         
     | 
| 
      
 203 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 204 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::ListNodesRequest.new
         
     | 
| 
      
 205 
     | 
    
         
            +
                        #
         
     | 
| 
      
 206 
     | 
    
         
            +
                        #   # Call the list_nodes method.
         
     | 
| 
      
 207 
     | 
    
         
            +
                        #   result = client.list_nodes request
         
     | 
| 
      
 208 
     | 
    
         
            +
                        #
         
     | 
| 
      
 209 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::PagedEnumerable. You can
         
     | 
| 
      
 210 
     | 
    
         
            +
                        #   # iterate over all elements by calling #each, and the enumerable
         
     | 
| 
      
 211 
     | 
    
         
            +
                        #   # will lazily make API calls to fetch subsequent pages. Other
         
     | 
| 
      
 212 
     | 
    
         
            +
                        #   # methods are also available for managing paging directly.
         
     | 
| 
      
 213 
     | 
    
         
            +
                        #   result.each do |response|
         
     | 
| 
      
 214 
     | 
    
         
            +
                        #     # Each element is of type ::Google::Cloud::Tpu::V1::Node.
         
     | 
| 
      
 215 
     | 
    
         
            +
                        #     p response
         
     | 
| 
      
 216 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 217 
     | 
    
         
            +
                        #
         
     | 
| 
       202 
218 
     | 
    
         
             
                        def list_nodes request, options = nil
         
     | 
| 
       203 
219 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       204 
220 
     | 
    
         | 
| 
         @@ -216,16 +232,20 @@ module Google 
     | 
|
| 
       216 
232 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       217 
233 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       218 
234 
     | 
    
         | 
| 
       219 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       220 
     | 
    
         
            -
             
     | 
| 
       221 
     | 
    
         
            -
             
     | 
| 
      
 235 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 236 
     | 
    
         
            +
                          if request.parent
         
     | 
| 
      
 237 
     | 
    
         
            +
                            header_params["parent"] = request.parent
         
     | 
| 
      
 238 
     | 
    
         
            +
                          end
         
     | 
| 
      
 239 
     | 
    
         
            +
             
     | 
| 
       222 
240 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       223 
241 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       224 
242 
     | 
    
         | 
| 
       225 
243 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.list_nodes.timeout,
         
     | 
| 
       226 
244 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       227 
245 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.list_nodes.retry_policy
         
     | 
| 
       228 
     | 
    
         
            -
             
     | 
| 
      
 246 
     | 
    
         
            +
             
     | 
| 
      
 247 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 248 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       229 
249 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       230 
250 
     | 
    
         | 
| 
       231 
251 
     | 
    
         
             
                          @tpu_stub.call_rpc :list_nodes, request, options: options do |response, operation|
         
     | 
| 
         @@ -266,6 +286,21 @@ module Google 
     | 
|
| 
       266 
286 
     | 
    
         
             
                        #
         
     | 
| 
       267 
287 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       268 
288 
     | 
    
         
             
                        #
         
     | 
| 
      
 289 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 290 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 291 
     | 
    
         
            +
                        #
         
     | 
| 
      
 292 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 293 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 294 
     | 
    
         
            +
                        #
         
     | 
| 
      
 295 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 296 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::GetNodeRequest.new
         
     | 
| 
      
 297 
     | 
    
         
            +
                        #
         
     | 
| 
      
 298 
     | 
    
         
            +
                        #   # Call the get_node method.
         
     | 
| 
      
 299 
     | 
    
         
            +
                        #   result = client.get_node request
         
     | 
| 
      
 300 
     | 
    
         
            +
                        #
         
     | 
| 
      
 301 
     | 
    
         
            +
                        #   # The returned object is of type Google::Cloud::Tpu::V1::Node.
         
     | 
| 
      
 302 
     | 
    
         
            +
                        #   p result
         
     | 
| 
      
 303 
     | 
    
         
            +
                        #
         
     | 
| 
       269 
304 
     | 
    
         
             
                        def get_node request, options = nil
         
     | 
| 
       270 
305 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       271 
306 
     | 
    
         | 
| 
         @@ -283,16 +318,20 @@ module Google 
     | 
|
| 
       283 
318 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       284 
319 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       285 
320 
     | 
    
         | 
| 
       286 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       287 
     | 
    
         
            -
             
     | 
| 
       288 
     | 
    
         
            -
             
     | 
| 
      
 321 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 322 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 323 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 324 
     | 
    
         
            +
                          end
         
     | 
| 
      
 325 
     | 
    
         
            +
             
     | 
| 
       289 
326 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       290 
327 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       291 
328 
     | 
    
         | 
| 
       292 
329 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.get_node.timeout,
         
     | 
| 
       293 
330 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       294 
331 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.get_node.retry_policy
         
     | 
| 
       295 
     | 
    
         
            -
             
     | 
| 
      
 332 
     | 
    
         
            +
             
     | 
| 
      
 333 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 334 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       296 
335 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       297 
336 
     | 
    
         | 
| 
       298 
337 
     | 
    
         
             
                          @tpu_stub.call_rpc :get_node, request, options: options do |response, operation|
         
     | 
| 
         @@ -336,6 +375,28 @@ module Google 
     | 
|
| 
       336 
375 
     | 
    
         
             
                        #
         
     | 
| 
       337 
376 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       338 
377 
     | 
    
         
             
                        #
         
     | 
| 
      
 378 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 379 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 380 
     | 
    
         
            +
                        #
         
     | 
| 
      
 381 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 382 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 383 
     | 
    
         
            +
                        #
         
     | 
| 
      
 384 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 385 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::CreateNodeRequest.new
         
     | 
| 
      
 386 
     | 
    
         
            +
                        #
         
     | 
| 
      
 387 
     | 
    
         
            +
                        #   # Call the create_node method.
         
     | 
| 
      
 388 
     | 
    
         
            +
                        #   result = client.create_node request
         
     | 
| 
      
 389 
     | 
    
         
            +
                        #
         
     | 
| 
      
 390 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::Operation. You can use this
         
     | 
| 
      
 391 
     | 
    
         
            +
                        #   # object to check the status of an operation, cancel it, or wait
         
     | 
| 
      
 392 
     | 
    
         
            +
                        #   # for results. Here is how to block until completion:
         
     | 
| 
      
 393 
     | 
    
         
            +
                        #   result.wait_until_done! timeout: 60
         
     | 
| 
      
 394 
     | 
    
         
            +
                        #   if result.response?
         
     | 
| 
      
 395 
     | 
    
         
            +
                        #     p result.response
         
     | 
| 
      
 396 
     | 
    
         
            +
                        #   else
         
     | 
| 
      
 397 
     | 
    
         
            +
                        #     puts "Error!"
         
     | 
| 
      
 398 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 399 
     | 
    
         
            +
                        #
         
     | 
| 
       339 
400 
     | 
    
         
             
                        def create_node request, options = nil
         
     | 
| 
       340 
401 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       341 
402 
     | 
    
         | 
| 
         @@ -353,16 +414,20 @@ module Google 
     | 
|
| 
       353 
414 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       354 
415 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       355 
416 
     | 
    
         | 
| 
       356 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       357 
     | 
    
         
            -
             
     | 
| 
       358 
     | 
    
         
            -
             
     | 
| 
      
 417 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 418 
     | 
    
         
            +
                          if request.parent
         
     | 
| 
      
 419 
     | 
    
         
            +
                            header_params["parent"] = request.parent
         
     | 
| 
      
 420 
     | 
    
         
            +
                          end
         
     | 
| 
      
 421 
     | 
    
         
            +
             
     | 
| 
       359 
422 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       360 
423 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       361 
424 
     | 
    
         | 
| 
       362 
425 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.create_node.timeout,
         
     | 
| 
       363 
426 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       364 
427 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.create_node.retry_policy
         
     | 
| 
       365 
     | 
    
         
            -
             
     | 
| 
      
 428 
     | 
    
         
            +
             
     | 
| 
      
 429 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 430 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       366 
431 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       367 
432 
     | 
    
         | 
| 
       368 
433 
     | 
    
         
             
                          @tpu_stub.call_rpc :create_node, request, options: options do |response, operation|
         
     | 
| 
         @@ -403,6 +468,28 @@ module Google 
     | 
|
| 
       403 
468 
     | 
    
         
             
                        #
         
     | 
| 
       404 
469 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       405 
470 
     | 
    
         
             
                        #
         
     | 
| 
      
 471 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 472 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 473 
     | 
    
         
            +
                        #
         
     | 
| 
      
 474 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 475 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 476 
     | 
    
         
            +
                        #
         
     | 
| 
      
 477 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 478 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::DeleteNodeRequest.new
         
     | 
| 
      
 479 
     | 
    
         
            +
                        #
         
     | 
| 
      
 480 
     | 
    
         
            +
                        #   # Call the delete_node method.
         
     | 
| 
      
 481 
     | 
    
         
            +
                        #   result = client.delete_node request
         
     | 
| 
      
 482 
     | 
    
         
            +
                        #
         
     | 
| 
      
 483 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::Operation. You can use this
         
     | 
| 
      
 484 
     | 
    
         
            +
                        #   # object to check the status of an operation, cancel it, or wait
         
     | 
| 
      
 485 
     | 
    
         
            +
                        #   # for results. Here is how to block until completion:
         
     | 
| 
      
 486 
     | 
    
         
            +
                        #   result.wait_until_done! timeout: 60
         
     | 
| 
      
 487 
     | 
    
         
            +
                        #   if result.response?
         
     | 
| 
      
 488 
     | 
    
         
            +
                        #     p result.response
         
     | 
| 
      
 489 
     | 
    
         
            +
                        #   else
         
     | 
| 
      
 490 
     | 
    
         
            +
                        #     puts "Error!"
         
     | 
| 
      
 491 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 492 
     | 
    
         
            +
                        #
         
     | 
| 
       406 
493 
     | 
    
         
             
                        def delete_node request, options = nil
         
     | 
| 
       407 
494 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       408 
495 
     | 
    
         | 
| 
         @@ -420,16 +507,20 @@ module Google 
     | 
|
| 
       420 
507 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       421 
508 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       422 
509 
     | 
    
         | 
| 
       423 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       424 
     | 
    
         
            -
             
     | 
| 
       425 
     | 
    
         
            -
             
     | 
| 
      
 510 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 511 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 512 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 513 
     | 
    
         
            +
                          end
         
     | 
| 
      
 514 
     | 
    
         
            +
             
     | 
| 
       426 
515 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       427 
516 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       428 
517 
     | 
    
         | 
| 
       429 
518 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.delete_node.timeout,
         
     | 
| 
       430 
519 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       431 
520 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.delete_node.retry_policy
         
     | 
| 
       432 
     | 
    
         
            -
             
     | 
| 
      
 521 
     | 
    
         
            +
             
     | 
| 
      
 522 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 523 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       433 
524 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       434 
525 
     | 
    
         | 
| 
       435 
526 
     | 
    
         
             
                          @tpu_stub.call_rpc :delete_node, request, options: options do |response, operation|
         
     | 
| 
         @@ -472,6 +563,28 @@ module Google 
     | 
|
| 
       472 
563 
     | 
    
         
             
                        #
         
     | 
| 
       473 
564 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       474 
565 
     | 
    
         
             
                        #
         
     | 
| 
      
 566 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 567 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 568 
     | 
    
         
            +
                        #
         
     | 
| 
      
 569 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 570 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 571 
     | 
    
         
            +
                        #
         
     | 
| 
      
 572 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 573 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::ReimageNodeRequest.new
         
     | 
| 
      
 574 
     | 
    
         
            +
                        #
         
     | 
| 
      
 575 
     | 
    
         
            +
                        #   # Call the reimage_node method.
         
     | 
| 
      
 576 
     | 
    
         
            +
                        #   result = client.reimage_node request
         
     | 
| 
      
 577 
     | 
    
         
            +
                        #
         
     | 
| 
      
 578 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::Operation. You can use this
         
     | 
| 
      
 579 
     | 
    
         
            +
                        #   # object to check the status of an operation, cancel it, or wait
         
     | 
| 
      
 580 
     | 
    
         
            +
                        #   # for results. Here is how to block until completion:
         
     | 
| 
      
 581 
     | 
    
         
            +
                        #   result.wait_until_done! timeout: 60
         
     | 
| 
      
 582 
     | 
    
         
            +
                        #   if result.response?
         
     | 
| 
      
 583 
     | 
    
         
            +
                        #     p result.response
         
     | 
| 
      
 584 
     | 
    
         
            +
                        #   else
         
     | 
| 
      
 585 
     | 
    
         
            +
                        #     puts "Error!"
         
     | 
| 
      
 586 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 587 
     | 
    
         
            +
                        #
         
     | 
| 
       475 
588 
     | 
    
         
             
                        def reimage_node request, options = nil
         
     | 
| 
       476 
589 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       477 
590 
     | 
    
         | 
| 
         @@ -489,16 +602,20 @@ module Google 
     | 
|
| 
       489 
602 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       490 
603 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       491 
604 
     | 
    
         | 
| 
       492 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       493 
     | 
    
         
            -
             
     | 
| 
       494 
     | 
    
         
            -
             
     | 
| 
      
 605 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 606 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 607 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 608 
     | 
    
         
            +
                          end
         
     | 
| 
      
 609 
     | 
    
         
            +
             
     | 
| 
       495 
610 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       496 
611 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       497 
612 
     | 
    
         | 
| 
       498 
613 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.reimage_node.timeout,
         
     | 
| 
       499 
614 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       500 
615 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.reimage_node.retry_policy
         
     | 
| 
       501 
     | 
    
         
            -
             
     | 
| 
      
 616 
     | 
    
         
            +
             
     | 
| 
      
 617 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 618 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       502 
619 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       503 
620 
     | 
    
         | 
| 
       504 
621 
     | 
    
         
             
                          @tpu_stub.call_rpc :reimage_node, request, options: options do |response, operation|
         
     | 
| 
         @@ -539,6 +656,28 @@ module Google 
     | 
|
| 
       539 
656 
     | 
    
         
             
                        #
         
     | 
| 
       540 
657 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       541 
658 
     | 
    
         
             
                        #
         
     | 
| 
      
 659 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 660 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 661 
     | 
    
         
            +
                        #
         
     | 
| 
      
 662 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 663 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 664 
     | 
    
         
            +
                        #
         
     | 
| 
      
 665 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 666 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::StopNodeRequest.new
         
     | 
| 
      
 667 
     | 
    
         
            +
                        #
         
     | 
| 
      
 668 
     | 
    
         
            +
                        #   # Call the stop_node method.
         
     | 
| 
      
 669 
     | 
    
         
            +
                        #   result = client.stop_node request
         
     | 
| 
      
 670 
     | 
    
         
            +
                        #
         
     | 
| 
      
 671 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::Operation. You can use this
         
     | 
| 
      
 672 
     | 
    
         
            +
                        #   # object to check the status of an operation, cancel it, or wait
         
     | 
| 
      
 673 
     | 
    
         
            +
                        #   # for results. Here is how to block until completion:
         
     | 
| 
      
 674 
     | 
    
         
            +
                        #   result.wait_until_done! timeout: 60
         
     | 
| 
      
 675 
     | 
    
         
            +
                        #   if result.response?
         
     | 
| 
      
 676 
     | 
    
         
            +
                        #     p result.response
         
     | 
| 
      
 677 
     | 
    
         
            +
                        #   else
         
     | 
| 
      
 678 
     | 
    
         
            +
                        #     puts "Error!"
         
     | 
| 
      
 679 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 680 
     | 
    
         
            +
                        #
         
     | 
| 
       542 
681 
     | 
    
         
             
                        def stop_node request, options = nil
         
     | 
| 
       543 
682 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       544 
683 
     | 
    
         | 
| 
         @@ -556,16 +695,20 @@ module Google 
     | 
|
| 
       556 
695 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       557 
696 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       558 
697 
     | 
    
         | 
| 
       559 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       560 
     | 
    
         
            -
             
     | 
| 
       561 
     | 
    
         
            -
             
     | 
| 
      
 698 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 699 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 700 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 701 
     | 
    
         
            +
                          end
         
     | 
| 
      
 702 
     | 
    
         
            +
             
     | 
| 
       562 
703 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       563 
704 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       564 
705 
     | 
    
         | 
| 
       565 
706 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.stop_node.timeout,
         
     | 
| 
       566 
707 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       567 
708 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.stop_node.retry_policy
         
     | 
| 
       568 
     | 
    
         
            -
             
     | 
| 
      
 709 
     | 
    
         
            +
             
     | 
| 
      
 710 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 711 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       569 
712 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       570 
713 
     | 
    
         | 
| 
       571 
714 
     | 
    
         
             
                          @tpu_stub.call_rpc :stop_node, request, options: options do |response, operation|
         
     | 
| 
         @@ -606,6 +749,28 @@ module Google 
     | 
|
| 
       606 
749 
     | 
    
         
             
                        #
         
     | 
| 
       607 
750 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       608 
751 
     | 
    
         
             
                        #
         
     | 
| 
      
 752 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 753 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 754 
     | 
    
         
            +
                        #
         
     | 
| 
      
 755 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 756 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 757 
     | 
    
         
            +
                        #
         
     | 
| 
      
 758 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 759 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::StartNodeRequest.new
         
     | 
| 
      
 760 
     | 
    
         
            +
                        #
         
     | 
| 
      
 761 
     | 
    
         
            +
                        #   # Call the start_node method.
         
     | 
| 
      
 762 
     | 
    
         
            +
                        #   result = client.start_node request
         
     | 
| 
      
 763 
     | 
    
         
            +
                        #
         
     | 
| 
      
 764 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::Operation. You can use this
         
     | 
| 
      
 765 
     | 
    
         
            +
                        #   # object to check the status of an operation, cancel it, or wait
         
     | 
| 
      
 766 
     | 
    
         
            +
                        #   # for results. Here is how to block until completion:
         
     | 
| 
      
 767 
     | 
    
         
            +
                        #   result.wait_until_done! timeout: 60
         
     | 
| 
      
 768 
     | 
    
         
            +
                        #   if result.response?
         
     | 
| 
      
 769 
     | 
    
         
            +
                        #     p result.response
         
     | 
| 
      
 770 
     | 
    
         
            +
                        #   else
         
     | 
| 
      
 771 
     | 
    
         
            +
                        #     puts "Error!"
         
     | 
| 
      
 772 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 773 
     | 
    
         
            +
                        #
         
     | 
| 
       609 
774 
     | 
    
         
             
                        def start_node request, options = nil
         
     | 
| 
       610 
775 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       611 
776 
     | 
    
         | 
| 
         @@ -623,16 +788,20 @@ module Google 
     | 
|
| 
       623 
788 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       624 
789 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       625 
790 
     | 
    
         | 
| 
       626 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       627 
     | 
    
         
            -
             
     | 
| 
       628 
     | 
    
         
            -
             
     | 
| 
      
 791 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 792 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 793 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 794 
     | 
    
         
            +
                          end
         
     | 
| 
      
 795 
     | 
    
         
            +
             
     | 
| 
       629 
796 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       630 
797 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       631 
798 
     | 
    
         | 
| 
       632 
799 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.start_node.timeout,
         
     | 
| 
       633 
800 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       634 
801 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.start_node.retry_policy
         
     | 
| 
       635 
     | 
    
         
            -
             
     | 
| 
      
 802 
     | 
    
         
            +
             
     | 
| 
      
 803 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 804 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       636 
805 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       637 
806 
     | 
    
         | 
| 
       638 
807 
     | 
    
         
             
                          @tpu_stub.call_rpc :start_node, request, options: options do |response, operation|
         
     | 
| 
         @@ -681,6 +850,27 @@ module Google 
     | 
|
| 
       681 
850 
     | 
    
         
             
                        #
         
     | 
| 
       682 
851 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       683 
852 
     | 
    
         
             
                        #
         
     | 
| 
      
 853 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 854 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 855 
     | 
    
         
            +
                        #
         
     | 
| 
      
 856 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 857 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 858 
     | 
    
         
            +
                        #
         
     | 
| 
      
 859 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 860 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.new
         
     | 
| 
      
 861 
     | 
    
         
            +
                        #
         
     | 
| 
      
 862 
     | 
    
         
            +
                        #   # Call the list_tensor_flow_versions method.
         
     | 
| 
      
 863 
     | 
    
         
            +
                        #   result = client.list_tensor_flow_versions request
         
     | 
| 
      
 864 
     | 
    
         
            +
                        #
         
     | 
| 
      
 865 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::PagedEnumerable. You can
         
     | 
| 
      
 866 
     | 
    
         
            +
                        #   # iterate over all elements by calling #each, and the enumerable
         
     | 
| 
      
 867 
     | 
    
         
            +
                        #   # will lazily make API calls to fetch subsequent pages. Other
         
     | 
| 
      
 868 
     | 
    
         
            +
                        #   # methods are also available for managing paging directly.
         
     | 
| 
      
 869 
     | 
    
         
            +
                        #   result.each do |response|
         
     | 
| 
      
 870 
     | 
    
         
            +
                        #     # Each element is of type ::Google::Cloud::Tpu::V1::TensorFlowVersion.
         
     | 
| 
      
 871 
     | 
    
         
            +
                        #     p response
         
     | 
| 
      
 872 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 873 
     | 
    
         
            +
                        #
         
     | 
| 
       684 
874 
     | 
    
         
             
                        def list_tensor_flow_versions request, options = nil
         
     | 
| 
       685 
875 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       686 
876 
     | 
    
         | 
| 
         @@ -698,16 +888,20 @@ module Google 
     | 
|
| 
       698 
888 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       699 
889 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       700 
890 
     | 
    
         | 
| 
       701 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       702 
     | 
    
         
            -
             
     | 
| 
       703 
     | 
    
         
            -
             
     | 
| 
      
 891 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 892 
     | 
    
         
            +
                          if request.parent
         
     | 
| 
      
 893 
     | 
    
         
            +
                            header_params["parent"] = request.parent
         
     | 
| 
      
 894 
     | 
    
         
            +
                          end
         
     | 
| 
      
 895 
     | 
    
         
            +
             
     | 
| 
       704 
896 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       705 
897 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       706 
898 
     | 
    
         | 
| 
       707 
899 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.list_tensor_flow_versions.timeout,
         
     | 
| 
       708 
900 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       709 
901 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.list_tensor_flow_versions.retry_policy
         
     | 
| 
       710 
     | 
    
         
            -
             
     | 
| 
      
 902 
     | 
    
         
            +
             
     | 
| 
      
 903 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 904 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       711 
905 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       712 
906 
     | 
    
         | 
| 
       713 
907 
     | 
    
         
             
                          @tpu_stub.call_rpc :list_tensor_flow_versions, request, options: options do |response, operation|
         
     | 
| 
         @@ -748,6 +942,21 @@ module Google 
     | 
|
| 
       748 
942 
     | 
    
         
             
                        #
         
     | 
| 
       749 
943 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       750 
944 
     | 
    
         
             
                        #
         
     | 
| 
      
 945 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 946 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 947 
     | 
    
         
            +
                        #
         
     | 
| 
      
 948 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 949 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 950 
     | 
    
         
            +
                        #
         
     | 
| 
      
 951 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 952 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new
         
     | 
| 
      
 953 
     | 
    
         
            +
                        #
         
     | 
| 
      
 954 
     | 
    
         
            +
                        #   # Call the get_tensor_flow_version method.
         
     | 
| 
      
 955 
     | 
    
         
            +
                        #   result = client.get_tensor_flow_version request
         
     | 
| 
      
 956 
     | 
    
         
            +
                        #
         
     | 
| 
      
 957 
     | 
    
         
            +
                        #   # The returned object is of type Google::Cloud::Tpu::V1::TensorFlowVersion.
         
     | 
| 
      
 958 
     | 
    
         
            +
                        #   p result
         
     | 
| 
      
 959 
     | 
    
         
            +
                        #
         
     | 
| 
       751 
960 
     | 
    
         
             
                        def get_tensor_flow_version request, options = nil
         
     | 
| 
       752 
961 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       753 
962 
     | 
    
         | 
| 
         @@ -765,16 +974,20 @@ module Google 
     | 
|
| 
       765 
974 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       766 
975 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       767 
976 
     | 
    
         | 
| 
       768 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       769 
     | 
    
         
            -
             
     | 
| 
       770 
     | 
    
         
            -
             
     | 
| 
      
 977 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 978 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 979 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 980 
     | 
    
         
            +
                          end
         
     | 
| 
      
 981 
     | 
    
         
            +
             
     | 
| 
       771 
982 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       772 
983 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       773 
984 
     | 
    
         | 
| 
       774 
985 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.get_tensor_flow_version.timeout,
         
     | 
| 
       775 
986 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       776 
987 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.get_tensor_flow_version.retry_policy
         
     | 
| 
       777 
     | 
    
         
            -
             
     | 
| 
      
 988 
     | 
    
         
            +
             
     | 
| 
      
 989 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 990 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       778 
991 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       779 
992 
     | 
    
         | 
| 
       780 
993 
     | 
    
         
             
                          @tpu_stub.call_rpc :get_tensor_flow_version, request, options: options do |response, operation|
         
     | 
| 
         @@ -822,6 +1035,27 @@ module Google 
     | 
|
| 
       822 
1035 
     | 
    
         
             
                        #
         
     | 
| 
       823 
1036 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       824 
1037 
     | 
    
         
             
                        #
         
     | 
| 
      
 1038 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 1039 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 1040 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1041 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 1042 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 1043 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1044 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 1045 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.new
         
     | 
| 
      
 1046 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1047 
     | 
    
         
            +
                        #   # Call the list_accelerator_types method.
         
     | 
| 
      
 1048 
     | 
    
         
            +
                        #   result = client.list_accelerator_types request
         
     | 
| 
      
 1049 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1050 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::PagedEnumerable. You can
         
     | 
| 
      
 1051 
     | 
    
         
            +
                        #   # iterate over all elements by calling #each, and the enumerable
         
     | 
| 
      
 1052 
     | 
    
         
            +
                        #   # will lazily make API calls to fetch subsequent pages. Other
         
     | 
| 
      
 1053 
     | 
    
         
            +
                        #   # methods are also available for managing paging directly.
         
     | 
| 
      
 1054 
     | 
    
         
            +
                        #   result.each do |response|
         
     | 
| 
      
 1055 
     | 
    
         
            +
                        #     # Each element is of type ::Google::Cloud::Tpu::V1::AcceleratorType.
         
     | 
| 
      
 1056 
     | 
    
         
            +
                        #     p response
         
     | 
| 
      
 1057 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 1058 
     | 
    
         
            +
                        #
         
     | 
| 
       825 
1059 
     | 
    
         
             
                        def list_accelerator_types request, options = nil
         
     | 
| 
       826 
1060 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       827 
1061 
     | 
    
         | 
| 
         @@ -839,16 +1073,20 @@ module Google 
     | 
|
| 
       839 
1073 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       840 
1074 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       841 
1075 
     | 
    
         | 
| 
       842 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       843 
     | 
    
         
            -
             
     | 
| 
       844 
     | 
    
         
            -
             
     | 
| 
      
 1076 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 1077 
     | 
    
         
            +
                          if request.parent
         
     | 
| 
      
 1078 
     | 
    
         
            +
                            header_params["parent"] = request.parent
         
     | 
| 
      
 1079 
     | 
    
         
            +
                          end
         
     | 
| 
      
 1080 
     | 
    
         
            +
             
     | 
| 
       845 
1081 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       846 
1082 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       847 
1083 
     | 
    
         | 
| 
       848 
1084 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.list_accelerator_types.timeout,
         
     | 
| 
       849 
1085 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       850 
1086 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.list_accelerator_types.retry_policy
         
     | 
| 
       851 
     | 
    
         
            -
             
     | 
| 
      
 1087 
     | 
    
         
            +
             
     | 
| 
      
 1088 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 1089 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       852 
1090 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       853 
1091 
     | 
    
         | 
| 
       854 
1092 
     | 
    
         
             
                          @tpu_stub.call_rpc :list_accelerator_types, request, options: options do |response, operation|
         
     | 
| 
         @@ -889,6 +1127,21 @@ module Google 
     | 
|
| 
       889 
1127 
     | 
    
         
             
                        #
         
     | 
| 
       890 
1128 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       891 
1129 
     | 
    
         
             
                        #
         
     | 
| 
      
 1130 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 1131 
     | 
    
         
            +
                        #   require "google/cloud/tpu/v1"
         
     | 
| 
      
 1132 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1133 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 1134 
     | 
    
         
            +
                        #   client = Google::Cloud::Tpu::V1::Tpu::Client.new
         
     | 
| 
      
 1135 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1136 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 1137 
     | 
    
         
            +
                        #   request = Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new
         
     | 
| 
      
 1138 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1139 
     | 
    
         
            +
                        #   # Call the get_accelerator_type method.
         
     | 
| 
      
 1140 
     | 
    
         
            +
                        #   result = client.get_accelerator_type request
         
     | 
| 
      
 1141 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1142 
     | 
    
         
            +
                        #   # The returned object is of type Google::Cloud::Tpu::V1::AcceleratorType.
         
     | 
| 
      
 1143 
     | 
    
         
            +
                        #   p result
         
     | 
| 
      
 1144 
     | 
    
         
            +
                        #
         
     | 
| 
       892 
1145 
     | 
    
         
             
                        def get_accelerator_type request, options = nil
         
     | 
| 
       893 
1146 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       894 
1147 
     | 
    
         | 
| 
         @@ -906,16 +1159,20 @@ module Google 
     | 
|
| 
       906 
1159 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       907 
1160 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       908 
1161 
     | 
    
         | 
| 
       909 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       910 
     | 
    
         
            -
             
     | 
| 
       911 
     | 
    
         
            -
             
     | 
| 
      
 1162 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 1163 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 1164 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 1165 
     | 
    
         
            +
                          end
         
     | 
| 
      
 1166 
     | 
    
         
            +
             
     | 
| 
       912 
1167 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       913 
1168 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       914 
1169 
     | 
    
         | 
| 
       915 
1170 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.get_accelerator_type.timeout,
         
     | 
| 
       916 
1171 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       917 
1172 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.get_accelerator_type.retry_policy
         
     | 
| 
       918 
     | 
    
         
            -
             
     | 
| 
      
 1173 
     | 
    
         
            +
             
     | 
| 
      
 1174 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 1175 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       919 
1176 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       920 
1177 
     | 
    
         | 
| 
       921 
1178 
     | 
    
         
             
                          @tpu_stub.call_rpc :get_accelerator_type, request, options: options do |response, operation|
         
     | 
| 
         @@ -939,22 +1196,21 @@ module Google 
     | 
|
| 
       939 
1196 
     | 
    
         
             
                        # Configuration can be applied globally to all clients, or to a single client
         
     | 
| 
       940 
1197 
     | 
    
         
             
                        # on construction.
         
     | 
| 
       941 
1198 
     | 
    
         
             
                        #
         
     | 
| 
       942 
     | 
    
         
            -
                        #  
     | 
| 
       943 
     | 
    
         
            -
                        #
         
     | 
| 
       944 
     | 
    
         
            -
                        #  
     | 
| 
       945 
     | 
    
         
            -
                        # to 20 seconds, 
     | 
| 
       946 
     | 
    
         
            -
                        #
         
     | 
| 
       947 
     | 
    
         
            -
                        # 
     | 
| 
       948 
     | 
    
         
            -
                        # 
     | 
| 
       949 
     | 
    
         
            -
                        # 
     | 
| 
       950 
     | 
    
         
            -
                        # 
     | 
| 
       951 
     | 
    
         
            -
                        #
         
     | 
| 
       952 
     | 
    
         
            -
                        #  
     | 
| 
       953 
     | 
    
         
            -
                        #
         
     | 
| 
       954 
     | 
    
         
            -
                        #      
     | 
| 
       955 
     | 
    
         
            -
                        # 
     | 
| 
       956 
     | 
    
         
            -
                        # 
     | 
| 
       957 
     | 
    
         
            -
                        #     end
         
     | 
| 
      
 1199 
     | 
    
         
            +
                        # @example
         
     | 
| 
      
 1200 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1201 
     | 
    
         
            +
                        #   # Modify the global config, setting the timeout for
         
     | 
| 
      
 1202 
     | 
    
         
            +
                        #   # list_nodes to 20 seconds,
         
     | 
| 
      
 1203 
     | 
    
         
            +
                        #   # and all remaining timeouts to 10 seconds.
         
     | 
| 
      
 1204 
     | 
    
         
            +
                        #   ::Google::Cloud::Tpu::V1::Tpu::Client.configure do |config|
         
     | 
| 
      
 1205 
     | 
    
         
            +
                        #     config.timeout = 10.0
         
     | 
| 
      
 1206 
     | 
    
         
            +
                        #     config.rpcs.list_nodes.timeout = 20.0
         
     | 
| 
      
 1207 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 1208 
     | 
    
         
            +
                        #
         
     | 
| 
      
 1209 
     | 
    
         
            +
                        #   # Apply the above configuration only to a new client.
         
     | 
| 
      
 1210 
     | 
    
         
            +
                        #   client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config|
         
     | 
| 
      
 1211 
     | 
    
         
            +
                        #     config.timeout = 10.0
         
     | 
| 
      
 1212 
     | 
    
         
            +
                        #     config.rpcs.list_nodes.timeout = 20.0
         
     | 
| 
      
 1213 
     | 
    
         
            +
                        #   end
         
     | 
| 
       958 
1214 
     | 
    
         
             
                        #
         
     | 
| 
       959 
1215 
     | 
    
         
             
                        # @!attribute [rw] endpoint
         
     | 
| 
       960 
1216 
     | 
    
         
             
                        #   The hostname or hostname:port of the service endpoint.
         
     | 
| 
         @@ -82,7 +82,7 @@ module Google 
     | 
|
| 
       82 
82 
     | 
    
         
             
                          # Create credentials
         
     | 
| 
       83 
83 
     | 
    
         
             
                          credentials = @config.credentials
         
     | 
| 
       84 
84 
     | 
    
         
             
                          credentials ||= Credentials.default scope: @config.scope
         
     | 
| 
       85 
     | 
    
         
            -
                          if credentials.is_a?(String) || credentials.is_a?(Hash)
         
     | 
| 
      
 85 
     | 
    
         
            +
                          if credentials.is_a?(::String) || credentials.is_a?(::Hash)
         
     | 
| 
       86 
86 
     | 
    
         
             
                            credentials = Credentials.new credentials, scope: @config.scope
         
     | 
| 
       87 
87 
     | 
    
         
             
                          end
         
     | 
| 
       88 
88 
     | 
    
         
             
                          @quota_project_id = @config.quota_project
         
     | 
| 
         @@ -143,6 +143,27 @@ module Google 
     | 
|
| 
       143 
143 
     | 
    
         
             
                        #
         
     | 
| 
       144 
144 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       145 
145 
     | 
    
         
             
                        #
         
     | 
| 
      
 146 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 147 
     | 
    
         
            +
                        #   require "google/longrunning"
         
     | 
| 
      
 148 
     | 
    
         
            +
                        #
         
     | 
| 
      
 149 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 150 
     | 
    
         
            +
                        #   client = Google::Longrunning::Operations::Client.new
         
     | 
| 
      
 151 
     | 
    
         
            +
                        #
         
     | 
| 
      
 152 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 153 
     | 
    
         
            +
                        #   request = Google::Longrunning::ListOperationsRequest.new
         
     | 
| 
      
 154 
     | 
    
         
            +
                        #
         
     | 
| 
      
 155 
     | 
    
         
            +
                        #   # Call the list_operations method.
         
     | 
| 
      
 156 
     | 
    
         
            +
                        #   result = client.list_operations request
         
     | 
| 
      
 157 
     | 
    
         
            +
                        #
         
     | 
| 
      
 158 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::PagedEnumerable. You can
         
     | 
| 
      
 159 
     | 
    
         
            +
                        #   # iterate over all elements by calling #each, and the enumerable
         
     | 
| 
      
 160 
     | 
    
         
            +
                        #   # will lazily make API calls to fetch subsequent pages. Other
         
     | 
| 
      
 161 
     | 
    
         
            +
                        #   # methods are also available for managing paging directly.
         
     | 
| 
      
 162 
     | 
    
         
            +
                        #   result.each do |response|
         
     | 
| 
      
 163 
     | 
    
         
            +
                        #     # Each element is of type ::Google::Longrunning::Operation.
         
     | 
| 
      
 164 
     | 
    
         
            +
                        #     p response
         
     | 
| 
      
 165 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 166 
     | 
    
         
            +
                        #
         
     | 
| 
       146 
167 
     | 
    
         
             
                        def list_operations request, options = nil
         
     | 
| 
       147 
168 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       148 
169 
     | 
    
         | 
| 
         @@ -160,16 +181,20 @@ module Google 
     | 
|
| 
       160 
181 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       161 
182 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       162 
183 
     | 
    
         | 
| 
       163 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       164 
     | 
    
         
            -
             
     | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
      
 184 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 185 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 186 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 187 
     | 
    
         
            +
                          end
         
     | 
| 
      
 188 
     | 
    
         
            +
             
     | 
| 
       166 
189 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       167 
190 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       168 
191 
     | 
    
         | 
| 
       169 
192 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.list_operations.timeout,
         
     | 
| 
       170 
193 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       171 
194 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.list_operations.retry_policy
         
     | 
| 
       172 
     | 
    
         
            -
             
     | 
| 
      
 195 
     | 
    
         
            +
             
     | 
| 
      
 196 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 197 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       173 
198 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       174 
199 
     | 
    
         | 
| 
       175 
200 
     | 
    
         
             
                          @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
         
     | 
| 
         @@ -213,6 +238,28 @@ module Google 
     | 
|
| 
       213 
238 
     | 
    
         
             
                        #
         
     | 
| 
       214 
239 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       215 
240 
     | 
    
         
             
                        #
         
     | 
| 
      
 241 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 242 
     | 
    
         
            +
                        #   require "google/longrunning"
         
     | 
| 
      
 243 
     | 
    
         
            +
                        #
         
     | 
| 
      
 244 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 245 
     | 
    
         
            +
                        #   client = Google::Longrunning::Operations::Client.new
         
     | 
| 
      
 246 
     | 
    
         
            +
                        #
         
     | 
| 
      
 247 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 248 
     | 
    
         
            +
                        #   request = Google::Longrunning::GetOperationRequest.new
         
     | 
| 
      
 249 
     | 
    
         
            +
                        #
         
     | 
| 
      
 250 
     | 
    
         
            +
                        #   # Call the get_operation method.
         
     | 
| 
      
 251 
     | 
    
         
            +
                        #   result = client.get_operation request
         
     | 
| 
      
 252 
     | 
    
         
            +
                        #
         
     | 
| 
      
 253 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::Operation. You can use this
         
     | 
| 
      
 254 
     | 
    
         
            +
                        #   # object to check the status of an operation, cancel it, or wait
         
     | 
| 
      
 255 
     | 
    
         
            +
                        #   # for results. Here is how to block until completion:
         
     | 
| 
      
 256 
     | 
    
         
            +
                        #   result.wait_until_done! timeout: 60
         
     | 
| 
      
 257 
     | 
    
         
            +
                        #   if result.response?
         
     | 
| 
      
 258 
     | 
    
         
            +
                        #     p result.response
         
     | 
| 
      
 259 
     | 
    
         
            +
                        #   else
         
     | 
| 
      
 260 
     | 
    
         
            +
                        #     puts "Error!"
         
     | 
| 
      
 261 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 262 
     | 
    
         
            +
                        #
         
     | 
| 
       216 
263 
     | 
    
         
             
                        def get_operation request, options = nil
         
     | 
| 
       217 
264 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       218 
265 
     | 
    
         | 
| 
         @@ -230,16 +277,20 @@ module Google 
     | 
|
| 
       230 
277 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       231 
278 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       232 
279 
     | 
    
         | 
| 
       233 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       234 
     | 
    
         
            -
             
     | 
| 
       235 
     | 
    
         
            -
             
     | 
| 
      
 280 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 281 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 282 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 283 
     | 
    
         
            +
                          end
         
     | 
| 
      
 284 
     | 
    
         
            +
             
     | 
| 
       236 
285 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       237 
286 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       238 
287 
     | 
    
         | 
| 
       239 
288 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.get_operation.timeout,
         
     | 
| 
       240 
289 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       241 
290 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.get_operation.retry_policy
         
     | 
| 
       242 
     | 
    
         
            -
             
     | 
| 
      
 291 
     | 
    
         
            +
             
     | 
| 
      
 292 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 293 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       243 
294 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       244 
295 
     | 
    
         | 
| 
       245 
296 
     | 
    
         
             
                          @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
         
     | 
| 
         @@ -283,6 +334,21 @@ module Google 
     | 
|
| 
       283 
334 
     | 
    
         
             
                        #
         
     | 
| 
       284 
335 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       285 
336 
     | 
    
         
             
                        #
         
     | 
| 
      
 337 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 338 
     | 
    
         
            +
                        #   require "google/longrunning"
         
     | 
| 
      
 339 
     | 
    
         
            +
                        #
         
     | 
| 
      
 340 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 341 
     | 
    
         
            +
                        #   client = Google::Longrunning::Operations::Client.new
         
     | 
| 
      
 342 
     | 
    
         
            +
                        #
         
     | 
| 
      
 343 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 344 
     | 
    
         
            +
                        #   request = Google::Longrunning::DeleteOperationRequest.new
         
     | 
| 
      
 345 
     | 
    
         
            +
                        #
         
     | 
| 
      
 346 
     | 
    
         
            +
                        #   # Call the delete_operation method.
         
     | 
| 
      
 347 
     | 
    
         
            +
                        #   result = client.delete_operation request
         
     | 
| 
      
 348 
     | 
    
         
            +
                        #
         
     | 
| 
      
 349 
     | 
    
         
            +
                        #   # The returned object is of type Google::Protobuf::Empty.
         
     | 
| 
      
 350 
     | 
    
         
            +
                        #   p result
         
     | 
| 
      
 351 
     | 
    
         
            +
                        #
         
     | 
| 
       286 
352 
     | 
    
         
             
                        def delete_operation request, options = nil
         
     | 
| 
       287 
353 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       288 
354 
     | 
    
         | 
| 
         @@ -300,16 +366,20 @@ module Google 
     | 
|
| 
       300 
366 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       301 
367 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       302 
368 
     | 
    
         | 
| 
       303 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       304 
     | 
    
         
            -
             
     | 
| 
       305 
     | 
    
         
            -
             
     | 
| 
      
 369 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 370 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 371 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 372 
     | 
    
         
            +
                          end
         
     | 
| 
      
 373 
     | 
    
         
            +
             
     | 
| 
       306 
374 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       307 
375 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       308 
376 
     | 
    
         | 
| 
       309 
377 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.delete_operation.timeout,
         
     | 
| 
       310 
378 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       311 
379 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.delete_operation.retry_policy
         
     | 
| 
       312 
     | 
    
         
            -
             
     | 
| 
      
 380 
     | 
    
         
            +
             
     | 
| 
      
 381 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 382 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       313 
383 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       314 
384 
     | 
    
         | 
| 
       315 
385 
     | 
    
         
             
                          @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
         
     | 
| 
         @@ -358,6 +428,21 @@ module Google 
     | 
|
| 
       358 
428 
     | 
    
         
             
                        #
         
     | 
| 
       359 
429 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       360 
430 
     | 
    
         
             
                        #
         
     | 
| 
      
 431 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 432 
     | 
    
         
            +
                        #   require "google/longrunning"
         
     | 
| 
      
 433 
     | 
    
         
            +
                        #
         
     | 
| 
      
 434 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 435 
     | 
    
         
            +
                        #   client = Google::Longrunning::Operations::Client.new
         
     | 
| 
      
 436 
     | 
    
         
            +
                        #
         
     | 
| 
      
 437 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 438 
     | 
    
         
            +
                        #   request = Google::Longrunning::CancelOperationRequest.new
         
     | 
| 
      
 439 
     | 
    
         
            +
                        #
         
     | 
| 
      
 440 
     | 
    
         
            +
                        #   # Call the cancel_operation method.
         
     | 
| 
      
 441 
     | 
    
         
            +
                        #   result = client.cancel_operation request
         
     | 
| 
      
 442 
     | 
    
         
            +
                        #
         
     | 
| 
      
 443 
     | 
    
         
            +
                        #   # The returned object is of type Google::Protobuf::Empty.
         
     | 
| 
      
 444 
     | 
    
         
            +
                        #   p result
         
     | 
| 
      
 445 
     | 
    
         
            +
                        #
         
     | 
| 
       361 
446 
     | 
    
         
             
                        def cancel_operation request, options = nil
         
     | 
| 
       362 
447 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       363 
448 
     | 
    
         | 
| 
         @@ -375,16 +460,20 @@ module Google 
     | 
|
| 
       375 
460 
     | 
    
         
             
                            gapic_version: ::Google::Cloud::Tpu::V1::VERSION
         
     | 
| 
       376 
461 
     | 
    
         
             
                          metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
         
     | 
| 
       377 
462 
     | 
    
         | 
| 
       378 
     | 
    
         
            -
                          header_params = {
         
     | 
| 
       379 
     | 
    
         
            -
             
     | 
| 
       380 
     | 
    
         
            -
             
     | 
| 
      
 463 
     | 
    
         
            +
                          header_params = {}
         
     | 
| 
      
 464 
     | 
    
         
            +
                          if request.name
         
     | 
| 
      
 465 
     | 
    
         
            +
                            header_params["name"] = request.name
         
     | 
| 
      
 466 
     | 
    
         
            +
                          end
         
     | 
| 
      
 467 
     | 
    
         
            +
             
     | 
| 
       381 
468 
     | 
    
         
             
                          request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
         
     | 
| 
       382 
469 
     | 
    
         
             
                          metadata[:"x-goog-request-params"] ||= request_params_header
         
     | 
| 
       383 
470 
     | 
    
         | 
| 
       384 
471 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.cancel_operation.timeout,
         
     | 
| 
       385 
472 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       386 
473 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.cancel_operation.retry_policy
         
     | 
| 
       387 
     | 
    
         
            -
             
     | 
| 
      
 474 
     | 
    
         
            +
             
     | 
| 
      
 475 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 476 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       388 
477 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       389 
478 
     | 
    
         | 
| 
       390 
479 
     | 
    
         
             
                          @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
         
     | 
| 
         @@ -436,6 +525,28 @@ module Google 
     | 
|
| 
       436 
525 
     | 
    
         
             
                        #
         
     | 
| 
       437 
526 
     | 
    
         
             
                        # @raise [::Google::Cloud::Error] if the RPC is aborted.
         
     | 
| 
       438 
527 
     | 
    
         
             
                        #
         
     | 
| 
      
 528 
     | 
    
         
            +
                        # @example Basic example
         
     | 
| 
      
 529 
     | 
    
         
            +
                        #   require "google/longrunning"
         
     | 
| 
      
 530 
     | 
    
         
            +
                        #
         
     | 
| 
      
 531 
     | 
    
         
            +
                        #   # Create a client object. The client can be reused for multiple calls.
         
     | 
| 
      
 532 
     | 
    
         
            +
                        #   client = Google::Longrunning::Operations::Client.new
         
     | 
| 
      
 533 
     | 
    
         
            +
                        #
         
     | 
| 
      
 534 
     | 
    
         
            +
                        #   # Create a request. To set request fields, pass in keyword arguments.
         
     | 
| 
      
 535 
     | 
    
         
            +
                        #   request = Google::Longrunning::WaitOperationRequest.new
         
     | 
| 
      
 536 
     | 
    
         
            +
                        #
         
     | 
| 
      
 537 
     | 
    
         
            +
                        #   # Call the wait_operation method.
         
     | 
| 
      
 538 
     | 
    
         
            +
                        #   result = client.wait_operation request
         
     | 
| 
      
 539 
     | 
    
         
            +
                        #
         
     | 
| 
      
 540 
     | 
    
         
            +
                        #   # The returned object is of type Gapic::Operation. You can use this
         
     | 
| 
      
 541 
     | 
    
         
            +
                        #   # object to check the status of an operation, cancel it, or wait
         
     | 
| 
      
 542 
     | 
    
         
            +
                        #   # for results. Here is how to block until completion:
         
     | 
| 
      
 543 
     | 
    
         
            +
                        #   result.wait_until_done! timeout: 60
         
     | 
| 
      
 544 
     | 
    
         
            +
                        #   if result.response?
         
     | 
| 
      
 545 
     | 
    
         
            +
                        #     p result.response
         
     | 
| 
      
 546 
     | 
    
         
            +
                        #   else
         
     | 
| 
      
 547 
     | 
    
         
            +
                        #     puts "Error!"
         
     | 
| 
      
 548 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 549 
     | 
    
         
            +
                        #
         
     | 
| 
       439 
550 
     | 
    
         
             
                        def wait_operation request, options = nil
         
     | 
| 
       440 
551 
     | 
    
         
             
                          raise ::ArgumentError, "request must be provided" if request.nil?
         
     | 
| 
       441 
552 
     | 
    
         | 
| 
         @@ -456,7 +567,9 @@ module Google 
     | 
|
| 
       456 
567 
     | 
    
         
             
                          options.apply_defaults timeout:      @config.rpcs.wait_operation.timeout,
         
     | 
| 
       457 
568 
     | 
    
         
             
                                                 metadata:     metadata,
         
     | 
| 
       458 
569 
     | 
    
         
             
                                                 retry_policy: @config.rpcs.wait_operation.retry_policy
         
     | 
| 
       459 
     | 
    
         
            -
             
     | 
| 
      
 570 
     | 
    
         
            +
             
     | 
| 
      
 571 
     | 
    
         
            +
                          options.apply_defaults timeout:      @config.timeout,
         
     | 
| 
      
 572 
     | 
    
         
            +
                                                 metadata:     @config.metadata,
         
     | 
| 
       460 
573 
     | 
    
         
             
                                                 retry_policy: @config.retry_policy
         
     | 
| 
       461 
574 
     | 
    
         | 
| 
       462 
575 
     | 
    
         
             
                          @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
         
     | 
| 
         @@ -481,22 +594,21 @@ module Google 
     | 
|
| 
       481 
594 
     | 
    
         
             
                        # Configuration can be applied globally to all clients, or to a single client
         
     | 
| 
       482 
595 
     | 
    
         
             
                        # on construction.
         
     | 
| 
       483 
596 
     | 
    
         
             
                        #
         
     | 
| 
       484 
     | 
    
         
            -
                        #  
     | 
| 
       485 
     | 
    
         
            -
                        #
         
     | 
| 
       486 
     | 
    
         
            -
                        #  
     | 
| 
       487 
     | 
    
         
            -
                        # to 20 seconds, 
     | 
| 
       488 
     | 
    
         
            -
                        #
         
     | 
| 
       489 
     | 
    
         
            -
                        # 
     | 
| 
       490 
     | 
    
         
            -
                        # 
     | 
| 
       491 
     | 
    
         
            -
                        # 
     | 
| 
       492 
     | 
    
         
            -
                        # 
     | 
| 
       493 
     | 
    
         
            -
                        #
         
     | 
| 
       494 
     | 
    
         
            -
                        #  
     | 
| 
       495 
     | 
    
         
            -
                        #
         
     | 
| 
       496 
     | 
    
         
            -
                        #      
     | 
| 
       497 
     | 
    
         
            -
                        # 
     | 
| 
       498 
     | 
    
         
            -
                        # 
     | 
| 
       499 
     | 
    
         
            -
                        #     end
         
     | 
| 
      
 597 
     | 
    
         
            +
                        # @example
         
     | 
| 
      
 598 
     | 
    
         
            +
                        #
         
     | 
| 
      
 599 
     | 
    
         
            +
                        #   # Modify the global config, setting the timeout for
         
     | 
| 
      
 600 
     | 
    
         
            +
                        #   # list_operations to 20 seconds,
         
     | 
| 
      
 601 
     | 
    
         
            +
                        #   # and all remaining timeouts to 10 seconds.
         
     | 
| 
      
 602 
     | 
    
         
            +
                        #   ::Google::Longrunning::Operations::Client.configure do |config|
         
     | 
| 
      
 603 
     | 
    
         
            +
                        #     config.timeout = 10.0
         
     | 
| 
      
 604 
     | 
    
         
            +
                        #     config.rpcs.list_operations.timeout = 20.0
         
     | 
| 
      
 605 
     | 
    
         
            +
                        #   end
         
     | 
| 
      
 606 
     | 
    
         
            +
                        #
         
     | 
| 
      
 607 
     | 
    
         
            +
                        #   # Apply the above configuration only to a new client.
         
     | 
| 
      
 608 
     | 
    
         
            +
                        #   client = ::Google::Longrunning::Operations::Client.new do |config|
         
     | 
| 
      
 609 
     | 
    
         
            +
                        #     config.timeout = 10.0
         
     | 
| 
      
 610 
     | 
    
         
            +
                        #     config.rpcs.list_operations.timeout = 20.0
         
     | 
| 
      
 611 
     | 
    
         
            +
                        #   end
         
     | 
| 
       500 
612 
     | 
    
         
             
                        #
         
     | 
| 
       501 
613 
     | 
    
         
             
                        # @!attribute [rw] endpoint
         
     | 
| 
       502 
614 
     | 
    
         
             
                        #   The hostname or hostname:port of the service endpoint.
         
     | 
| 
         @@ -60,6 +60,12 @@ module Google 
     | 
|
| 
       60 
60 
     | 
    
         
             
                  # in any arbitrary  order, rather than the order the user originally
         
     | 
| 
       61 
61 
     | 
    
         
             
                  # provided. Additionally, the list's order may or may not be stable.
         
     | 
| 
       62 
62 
     | 
    
         
             
                  UNORDERED_LIST = 6
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                  # Denotes that this field returns a non-empty default value if not set.
         
     | 
| 
      
 65 
     | 
    
         
            +
                  # This indicates that if the user provides the empty value in a request,
         
     | 
| 
      
 66 
     | 
    
         
            +
                  # a non-empty value will be returned. The user will not be aware of what
         
     | 
| 
      
 67 
     | 
    
         
            +
                  # non-empty value to expect.
         
     | 
| 
      
 68 
     | 
    
         
            +
                  NON_EMPTY_DEFAULT = 7
         
     | 
| 
       63 
69 
     | 
    
         
             
                end
         
     | 
| 
       64 
70 
     | 
    
         
             
              end
         
     | 
| 
       65 
71 
     | 
    
         
             
            end
         
     | 
| 
         @@ -33,11 +33,7 @@ module Google 
     | 
|
| 
       33 
33 
     | 
    
         
             
                #       // For Kubernetes resources, the format is {api group}/{kind}.
         
     | 
| 
       34 
34 
     | 
    
         
             
                #       option (google.api.resource) = {
         
     | 
| 
       35 
35 
     | 
    
         
             
                #         type: "pubsub.googleapis.com/Topic"
         
     | 
| 
       36 
     | 
    
         
            -
                #          
     | 
| 
       37 
     | 
    
         
            -
                #           pattern: "projects/{project}/topics/{topic}"
         
     | 
| 
       38 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Project"
         
     | 
| 
       39 
     | 
    
         
            -
                #           parent_name_extractor: "projects/{project}"
         
     | 
| 
       40 
     | 
    
         
            -
                #         }
         
     | 
| 
      
 36 
     | 
    
         
            +
                #         pattern: "projects/{project}/topics/{topic}"
         
     | 
| 
       41 
37 
     | 
    
         
             
                #       };
         
     | 
| 
       42 
38 
     | 
    
         
             
                #     }
         
     | 
| 
       43 
39 
     | 
    
         
             
                #
         
     | 
| 
         @@ -45,10 +41,7 @@ module Google 
     | 
|
| 
       45 
41 
     | 
    
         
             
                #
         
     | 
| 
       46 
42 
     | 
    
         
             
                #     resources:
         
     | 
| 
       47 
43 
     | 
    
         
             
                #     - type: "pubsub.googleapis.com/Topic"
         
     | 
| 
       48 
     | 
    
         
            -
                #        
     | 
| 
       49 
     | 
    
         
            -
                #         - pattern: "projects/{project}/topics/{topic}"
         
     | 
| 
       50 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Project"
         
     | 
| 
       51 
     | 
    
         
            -
                #           parent_name_extractor: "projects/{project}"
         
     | 
| 
      
 44 
     | 
    
         
            +
                #       pattern: "projects/{project}/topics/{topic}"
         
     | 
| 
       52 
45 
     | 
    
         
             
                #
         
     | 
| 
       53 
46 
     | 
    
         
             
                # Sometimes, resources have multiple patterns, typically because they can
         
     | 
| 
       54 
47 
     | 
    
         
             
                # live under multiple parents.
         
     | 
| 
         @@ -58,26 +51,10 @@ module Google 
     | 
|
| 
       58 
51 
     | 
    
         
             
                #     message LogEntry {
         
     | 
| 
       59 
52 
     | 
    
         
             
                #       option (google.api.resource) = {
         
     | 
| 
       60 
53 
     | 
    
         
             
                #         type: "logging.googleapis.com/LogEntry"
         
     | 
| 
       61 
     | 
    
         
            -
                #          
     | 
| 
       62 
     | 
    
         
            -
                # 
     | 
| 
       63 
     | 
    
         
            -
                # 
     | 
| 
       64 
     | 
    
         
            -
                # 
     | 
| 
       65 
     | 
    
         
            -
                #         }
         
     | 
| 
       66 
     | 
    
         
            -
                #         name_descriptor: {
         
     | 
| 
       67 
     | 
    
         
            -
                #           pattern: "folders/{folder}/logs/{log}"
         
     | 
| 
       68 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Folder"
         
     | 
| 
       69 
     | 
    
         
            -
                #           parent_name_extractor: "folders/{folder}"
         
     | 
| 
       70 
     | 
    
         
            -
                #         }
         
     | 
| 
       71 
     | 
    
         
            -
                #         name_descriptor: {
         
     | 
| 
       72 
     | 
    
         
            -
                #           pattern: "organizations/{organization}/logs/{log}"
         
     | 
| 
       73 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Organization"
         
     | 
| 
       74 
     | 
    
         
            -
                #           parent_name_extractor: "organizations/{organization}"
         
     | 
| 
       75 
     | 
    
         
            -
                #         }
         
     | 
| 
       76 
     | 
    
         
            -
                #         name_descriptor: {
         
     | 
| 
       77 
     | 
    
         
            -
                #           pattern: "billingAccounts/{billing_account}/logs/{log}"
         
     | 
| 
       78 
     | 
    
         
            -
                #           parent_type: "billing.googleapis.com/BillingAccount"
         
     | 
| 
       79 
     | 
    
         
            -
                #           parent_name_extractor: "billingAccounts/{billing_account}"
         
     | 
| 
       80 
     | 
    
         
            -
                #         }
         
     | 
| 
      
 54 
     | 
    
         
            +
                #         pattern: "projects/{project}/logs/{log}"
         
     | 
| 
      
 55 
     | 
    
         
            +
                #         pattern: "folders/{folder}/logs/{log}"
         
     | 
| 
      
 56 
     | 
    
         
            +
                #         pattern: "organizations/{organization}/logs/{log}"
         
     | 
| 
      
 57 
     | 
    
         
            +
                #         pattern: "billingAccounts/{billing_account}/logs/{log}"
         
     | 
| 
       81 
58 
     | 
    
         
             
                #       };
         
     | 
| 
       82 
59 
     | 
    
         
             
                #     }
         
     | 
| 
       83 
60 
     | 
    
         
             
                #
         
     | 
| 
         @@ -85,48 +62,10 @@ module Google 
     | 
|
| 
       85 
62 
     | 
    
         
             
                #
         
     | 
| 
       86 
63 
     | 
    
         
             
                #     resources:
         
     | 
| 
       87 
64 
     | 
    
         
             
                #     - type: 'logging.googleapis.com/LogEntry'
         
     | 
| 
       88 
     | 
    
         
            -
                #        
     | 
| 
       89 
     | 
    
         
            -
                # 
     | 
| 
       90 
     | 
    
         
            -
                # 
     | 
| 
       91 
     | 
    
         
            -
                # 
     | 
| 
       92 
     | 
    
         
            -
                #         - pattern: "folders/{folder}/logs/{log}"
         
     | 
| 
       93 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Folder"
         
     | 
| 
       94 
     | 
    
         
            -
                #           parent_name_extractor: "folders/{folder}"
         
     | 
| 
       95 
     | 
    
         
            -
                #         - pattern: "organizations/{organization}/logs/{log}"
         
     | 
| 
       96 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Organization"
         
     | 
| 
       97 
     | 
    
         
            -
                #           parent_name_extractor: "organizations/{organization}"
         
     | 
| 
       98 
     | 
    
         
            -
                #         - pattern: "billingAccounts/{billing_account}/logs/{log}"
         
     | 
| 
       99 
     | 
    
         
            -
                #           parent_type: "billing.googleapis.com/BillingAccount"
         
     | 
| 
       100 
     | 
    
         
            -
                #           parent_name_extractor: "billingAccounts/{billing_account}"
         
     | 
| 
       101 
     | 
    
         
            -
                #
         
     | 
| 
       102 
     | 
    
         
            -
                # For flexible resources, the resource name doesn't contain parent names, but
         
     | 
| 
       103 
     | 
    
         
            -
                # the resource itself has parents for policy evaluation.
         
     | 
| 
       104 
     | 
    
         
            -
                #
         
     | 
| 
       105 
     | 
    
         
            -
                # Example:
         
     | 
| 
       106 
     | 
    
         
            -
                #
         
     | 
| 
       107 
     | 
    
         
            -
                #     message Shelf {
         
     | 
| 
       108 
     | 
    
         
            -
                #       option (google.api.resource) = {
         
     | 
| 
       109 
     | 
    
         
            -
                #         type: "library.googleapis.com/Shelf"
         
     | 
| 
       110 
     | 
    
         
            -
                #         name_descriptor: {
         
     | 
| 
       111 
     | 
    
         
            -
                #           pattern: "shelves/{shelf}"
         
     | 
| 
       112 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Project"
         
     | 
| 
       113 
     | 
    
         
            -
                #         }
         
     | 
| 
       114 
     | 
    
         
            -
                #         name_descriptor: {
         
     | 
| 
       115 
     | 
    
         
            -
                #           pattern: "shelves/{shelf}"
         
     | 
| 
       116 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Folder"
         
     | 
| 
       117 
     | 
    
         
            -
                #         }
         
     | 
| 
       118 
     | 
    
         
            -
                #       };
         
     | 
| 
       119 
     | 
    
         
            -
                #     }
         
     | 
| 
       120 
     | 
    
         
            -
                #
         
     | 
| 
       121 
     | 
    
         
            -
                # The ResourceDescriptor Yaml config will look like:
         
     | 
| 
       122 
     | 
    
         
            -
                #
         
     | 
| 
       123 
     | 
    
         
            -
                #     resources:
         
     | 
| 
       124 
     | 
    
         
            -
                #     - type: 'library.googleapis.com/Shelf'
         
     | 
| 
       125 
     | 
    
         
            -
                #       name_descriptor:
         
     | 
| 
       126 
     | 
    
         
            -
                #         - pattern: "shelves/{shelf}"
         
     | 
| 
       127 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Project"
         
     | 
| 
       128 
     | 
    
         
            -
                #         - pattern: "shelves/{shelf}"
         
     | 
| 
       129 
     | 
    
         
            -
                #           parent_type: "cloudresourcemanager.googleapis.com/Folder"
         
     | 
| 
      
 65 
     | 
    
         
            +
                #       pattern: "projects/{project}/logs/{log}"
         
     | 
| 
      
 66 
     | 
    
         
            +
                #       pattern: "folders/{folder}/logs/{log}"
         
     | 
| 
      
 67 
     | 
    
         
            +
                #       pattern: "organizations/{organization}/logs/{log}"
         
     | 
| 
      
 68 
     | 
    
         
            +
                #       pattern: "billingAccounts/{billing_account}/logs/{log}"
         
     | 
| 
       130 
69 
     | 
    
         
             
                # @!attribute [rw] type
         
     | 
| 
       131 
70 
     | 
    
         
             
                #   @return [::String]
         
     | 
| 
       132 
71 
     | 
    
         
             
                #     The resource type. It must be in the format of
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: google-cloud-tpu-v1
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Google LLC
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-01-11 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: gapic-common
         
     | 
| 
         @@ -16,7 +16,7 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - ">="
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: '0. 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '0.7'
         
     | 
| 
       20 
20 
     | 
    
         
             
                - - "<"
         
     | 
| 
       21 
21 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       22 
22 
     | 
    
         
             
                    version: 2.a
         
     | 
| 
         @@ -26,7 +26,7 @@ dependencies: 
     | 
|
| 
       26 
26 
     | 
    
         
             
                requirements:
         
     | 
| 
       27 
27 
     | 
    
         
             
                - - ">="
         
     | 
| 
       28 
28 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       29 
     | 
    
         
            -
                    version: '0. 
     | 
| 
      
 29 
     | 
    
         
            +
                    version: '0.7'
         
     | 
| 
       30 
30 
     | 
    
         
             
                - - "<"
         
     | 
| 
       31 
31 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       32 
32 
     | 
    
         
             
                    version: 2.a
         
     | 
| 
         @@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       210 
210 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       211 
211 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       212 
212 
     | 
    
         
             
            requirements: []
         
     | 
| 
       213 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 213 
     | 
    
         
            +
            rubygems_version: 3.3.4
         
     | 
| 
       214 
214 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       215 
215 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       216 
216 
     | 
    
         
             
            summary: API Client library for the Cloud TPU V1 API
         
     |