From 2c16fda924778504b1c460a46389c031a606a904 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:16:27 -0700 Subject: [PATCH] feat: Automated regeneration of TPU client (#11057) Auto-created at 2024-03-13 03:15:15 +0000 using the toys pull request generator. --- clients/tpu/README.md | 2 +- .../tpu/lib/google_api/tpu/v2/api/projects.ex | 1673 +++++++++++++++++ .../tpu/lib/google_api/tpu/v2/connection.ex | 32 + clients/tpu/lib/google_api/tpu/v2/metadata.ex | 26 + .../tpu/v2/model/accelerator_config.ex | 49 + .../tpu/v2/model/accelerator_type.ex | 52 + .../google_api/tpu/v2/model/accepted_data.ex | 41 + .../google_api/tpu/v2/model/access_config.ex | 46 + .../google_api/tpu/v2/model/active_data.ex | 41 + .../google_api/tpu/v2/model/attached_disk.ex | 49 + .../google_api/tpu/v2/model/creating_data.ex | 41 + .../google_api/tpu/v2/model/deleting_data.ex | 41 + .../tpu/lib/google_api/tpu/v2/model/empty.ex | 41 + .../google_api/tpu/v2/model/failed_data.ex | 46 + .../generate_service_identity_request.ex | 41 + .../generate_service_identity_response.ex | 46 + .../v2/model/get_guest_attributes_request.ex | 49 + .../v2/model/get_guest_attributes_response.ex | 46 + .../lib/google_api/tpu/v2/model/guaranteed.ex | 46 + .../tpu/v2/model/guest_attributes.ex | 49 + .../tpu/v2/model/guest_attributes_entry.ex | 52 + .../tpu/v2/model/guest_attributes_value.ex | 46 + .../lib/google_api/tpu/v2/model/interval.ex | 49 + .../model/list_accelerator_types_response.ex | 52 + .../tpu/v2/model/list_locations_response.ex | 49 + .../tpu/v2/model/list_nodes_response.ex | 52 + .../tpu/v2/model/list_operations_response.ex | 49 + .../model/list_queued_resources_response.ex | 52 + .../model/list_runtime_versions_response.ex | 52 + .../lib/google_api/tpu/v2/model/location.ex | 58 + .../tpu/v2/model/multislice_params.ex | 49 + .../google_api/tpu/v2/model/network_config.ex | 58 + .../tpu/v2/model/network_endpoint.ex | 52 + .../tpu/lib/google_api/tpu/v2/model/node.ex | 115 ++ .../lib/google_api/tpu/v2/model/node_spec.ex | 55 + .../lib/google_api/tpu/v2/model/operation.ex | 58 + .../tpu/v2/model/operation_metadata.ex | 64 + .../tpu/v2/model/provisioning_data.ex | 41 + .../tpu/v2/model/queued_resource.ex | 67 + .../tpu/v2/model/queued_resource_state.ex | 73 + .../tpu/v2/model/queueing_policy.ex | 58 + .../v2/model/reset_queued_resource_request.ex | 41 + .../tpu/v2/model/runtime_version.ex | 49 + .../tpu/v2/model/scheduling_config.ex | 52 + .../tpu/v2/model/service_account.ex | 49 + .../tpu/v2/model/service_identity.ex | 46 + .../tpu/v2/model/shielded_instance_config.ex | 46 + .../tpu/lib/google_api/tpu/v2/model/spot.ex | 41 + .../tpu/v2/model/start_node_request.ex | 41 + .../tpu/lib/google_api/tpu/v2/model/status.ex | 52 + .../tpu/v2/model/stop_node_request.ex | 41 + .../google_api/tpu/v2/model/suspended_data.ex | 41 + .../tpu/v2/model/suspending_data.ex | 41 + .../lib/google_api/tpu/v2/model/symptom.ex | 55 + .../tpu/lib/google_api/tpu/v2/model/tpu.ex | 46 + clients/tpu/mix.exs | 2 +- 56 files changed, 4299 insertions(+), 2 deletions(-) create mode 100644 clients/tpu/lib/google_api/tpu/v2/api/projects.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/connection.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/metadata.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/accelerator_config.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/accelerator_type.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/accepted_data.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/access_config.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/active_data.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/attached_disk.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/creating_data.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/deleting_data.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/empty.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/failed_data.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/generate_service_identity_request.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/generate_service_identity_response.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/get_guest_attributes_request.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/get_guest_attributes_response.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/guaranteed.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/guest_attributes.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/guest_attributes_entry.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/guest_attributes_value.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/interval.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/list_accelerator_types_response.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/list_locations_response.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/list_nodes_response.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/list_operations_response.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/list_queued_resources_response.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/list_runtime_versions_response.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/location.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/multislice_params.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/network_config.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/network_endpoint.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/node.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/node_spec.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/operation.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/operation_metadata.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/provisioning_data.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/queued_resource.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/queued_resource_state.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/queueing_policy.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/reset_queued_resource_request.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/runtime_version.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/scheduling_config.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/service_account.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/service_identity.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/shielded_instance_config.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/spot.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/start_node_request.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/status.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/stop_node_request.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/suspended_data.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/suspending_data.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/symptom.ex create mode 100644 clients/tpu/lib/google_api/tpu/v2/model/tpu.ex diff --git a/clients/tpu/README.md b/clients/tpu/README.md index 7d3df6c006..97a2e32216 100644 --- a/clients/tpu/README.md +++ b/clients/tpu/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_tpu, "~> 0.15"}] + [{:google_api_tpu, "~> 0.16"}] end ``` diff --git a/clients/tpu/lib/google_api/tpu/v2/api/projects.ex b/clients/tpu/lib/google_api/tpu/v2/api/projects.ex new file mode 100644 index 0000000000..56c0369483 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/api/projects.ex @@ -0,0 +1,1673 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Api.Projects do + @moduledoc """ + API calls for all endpoints tagged `Projects`. + """ + + alias GoogleApi.TPU.V2.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Generates the Cloud TPU service identity for the project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.TPU.V2.Model.GenerateServiceIdentityRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.GenerateServiceIdentityResponse{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_generate_service_identity( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.GenerateServiceIdentityResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_generate_service_identity( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+parent}:generateServiceIdentity", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.TPU.V2.Model.GenerateServiceIdentityResponse{}] + ) + end + + @doc """ + Gets information about a location. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Resource name for the location. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Location{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TPU.V2.Model.Location.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_get(connection, name, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Location{}]) + end + + @doc """ + Lists information about the supported locations for this service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The resource that owns the locations collection, if applicable. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return. If not set, the service selects a default. + * `:pageToken` (*type:* `String.t`) - A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.ListLocationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TPU.V2.Model.ListLocationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_list(connection, name, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+name}/locations", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.ListLocationsResponse{}]) + end + + @doc """ + Gets AcceleratorType. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.AcceleratorType{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_accelerator_types_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.AcceleratorType.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_accelerator_types_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.AcceleratorType{}]) + end + + @doc """ + Lists accelerator types supported by this API. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - List filter. + * `:orderBy` (*type:* `String.t`) - Sort results. + * `:pageSize` (*type:* `integer()`) - The maximum number of items to return. + * `:pageToken` (*type:* `String.t`) - The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.ListAcceleratorTypesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_accelerator_types_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.ListAcceleratorTypesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_accelerator_types_list( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+parent}/acceleratorTypes", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.ListAcceleratorTypesResponse{}]) + end + + @doc """ + Creates a node. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:nodeId` (*type:* `String.t`) - The unqualified resource name. + * `:body` (*type:* `GoogleApi.TPU.V2.Model.Node.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_nodes_create(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TPU.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_nodes_create(connection, parent, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :nodeId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+parent}/nodes", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Operation{}]) + end + + @doc """ + Deletes a node. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_nodes_delete(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TPU.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_nodes_delete(connection, name, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Operation{}]) + end + + @doc """ + Gets the details of a node. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Node{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_nodes_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TPU.V2.Model.Node.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_nodes_get(connection, name, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Node{}]) + end + + @doc """ + Retrieves the guest attributes for the node. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.TPU.V2.Model.GetGuestAttributesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.GetGuestAttributesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_nodes_get_guest_attributes( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.GetGuestAttributesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_nodes_get_guest_attributes( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+name}:getGuestAttributes", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.GetGuestAttributesResponse{}]) + end + + @doc """ + Lists nodes. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of items to return. + * `:pageToken` (*type:* `String.t`) - The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.ListNodesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_nodes_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TPU.V2.Model.ListNodesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_nodes_list(connection, parent, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+parent}/nodes", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.ListNodesResponse{}]) + end + + @doc """ + Updates the configurations of a node. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Output only. Immutable. The name of the TPU. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips]. + * `:body` (*type:* `GoogleApi.TPU.V2.Model.Node.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_nodes_patch(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TPU.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_nodes_patch(connection, name, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Operation{}]) + end + + @doc """ + Starts a node. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.TPU.V2.Model.StartNodeRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_nodes_start(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TPU.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_nodes_start(connection, name, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+name}:start", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Operation{}]) + end + + @doc """ + Stops a node. This operation is only available with single TPU nodes. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.TPU.V2.Model.StopNodeRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_nodes_stop(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TPU.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_nodes_stop(connection, name, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+name}:stop", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Operation{}]) + end + + @doc """ + Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource to be cancelled. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_operations_cancel( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_operations_cancel( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+name}:cancel", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Empty{}]) + end + + @doc """ + Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource to be deleted. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_operations_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_operations_delete( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Empty{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_operations_get(connection, name, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Operation{}]) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.ListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.ListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_operations_list(connection, name, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+name}/operations", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.ListOperationsResponse{}]) + end + + @doc """ + Creates a QueuedResource TPU instance. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:queuedResourceId` (*type:* `String.t`) - Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. + * `:requestId` (*type:* `String.t`) - Optional. Idempotent request UUID. + * `:body` (*type:* `GoogleApi.TPU.V2.Model.QueuedResource.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_queued_resources_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_queued_resources_create( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :queuedResourceId => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+parent}/queuedResources", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Operation{}]) + end + + @doc """ + Deletes a QueuedResource TPU instance. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:force` (*type:* `boolean()`) - Optional. If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state. + * `:requestId` (*type:* `String.t`) - Optional. Idempotent request UUID. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_queued_resources_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_queued_resources_delete( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :force => :query, + :requestId => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Operation{}]) + end + + @doc """ + Gets details of a queued resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.QueuedResource{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_queued_resources_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.QueuedResource.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_queued_resources_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.QueuedResource{}]) + end + + @doc """ + Lists queued resources. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of items to return. + * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.ListQueuedResourcesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_queued_resources_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.ListQueuedResourcesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_queued_resources_list( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+parent}/queuedResources", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.ListQueuedResourcesResponse{}]) + end + + @doc """ + Resets a QueuedResource TPU instance + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the queued resource. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.TPU.V2.Model.ResetQueuedResourceRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_queued_resources_reset( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_queued_resources_reset( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+name}:reset", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.Operation{}]) + end + + @doc """ + Gets a runtime version. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.RuntimeVersion{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_runtime_versions_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.RuntimeVersion.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_runtime_versions_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.RuntimeVersion{}]) + end + + @doc """ + Lists runtime versions supported by this API. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TPU.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - List filter. + * `:orderBy` (*type:* `String.t`) - Sort results. + * `:pageSize` (*type:* `integer()`) - The maximum number of items to return. + * `:pageToken` (*type:* `String.t`) - The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TPU.V2.Model.ListRuntimeVersionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec tpu_projects_locations_runtime_versions_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TPU.V2.Model.ListRuntimeVersionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def tpu_projects_locations_runtime_versions_list( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+parent}/runtimeVersions", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.TPU.V2.Model.ListRuntimeVersionsResponse{}]) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/connection.ex b/clients/tpu/lib/google_api/tpu/v2/connection.ex new file mode 100644 index 0000000000..cba7730964 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/connection.ex @@ -0,0 +1,32 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Connection do + @moduledoc """ + Handle Tesla connections for GoogleApi.TPU.V2. + """ + + @type t :: Tesla.Env.client() + + use GoogleApi.Gax.Connection, + scopes: [ + # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. + "https://www.googleapis.com/auth/cloud-platform" + ], + otp_app: :google_api_tpu, + base_url: "https://tpu.googleapis.com/" +end diff --git a/clients/tpu/lib/google_api/tpu/v2/metadata.ex b/clients/tpu/lib/google_api/tpu/v2/metadata.ex new file mode 100644 index 0000000000..82f0009b8b --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/metadata.ex @@ -0,0 +1,26 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2 do + @moduledoc """ + API client metadata for GoogleApi.TPU.V2. + """ + + @discovery_revision "20240222" + + def discovery_revision(), do: @discovery_revision +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/accelerator_config.ex b/clients/tpu/lib/google_api/tpu/v2/model/accelerator_config.ex new file mode 100644 index 0000000000..ea94c368fe --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/accelerator_config.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.AcceleratorConfig do + @moduledoc """ + A TPU accelerator configuration. + + ## Attributes + + * `topology` (*type:* `String.t`, *default:* `nil`) - Required. Topology of TPU in chips. + * `type` (*type:* `String.t`, *default:* `nil`) - Required. Type of TPU. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :topology => String.t() | nil, + :type => String.t() | nil + } + + field(:topology) + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.AcceleratorConfig do + def decode(value, options) do + GoogleApi.TPU.V2.Model.AcceleratorConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.AcceleratorConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/accelerator_type.ex b/clients/tpu/lib/google_api/tpu/v2/model/accelerator_type.ex new file mode 100644 index 0000000000..95f2afab63 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/accelerator_type.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.AcceleratorType do + @moduledoc """ + A accelerator type that a Node can be configured with. + + ## Attributes + + * `acceleratorConfigs` (*type:* `list(GoogleApi.TPU.V2.Model.AcceleratorConfig.t)`, *default:* `nil`) - The accelerator config. + * `name` (*type:* `String.t`, *default:* `nil`) - The resource name. + * `type` (*type:* `String.t`, *default:* `nil`) - The accelerator type. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :acceleratorConfigs => list(GoogleApi.TPU.V2.Model.AcceleratorConfig.t()) | nil, + :name => String.t() | nil, + :type => String.t() | nil + } + + field(:acceleratorConfigs, as: GoogleApi.TPU.V2.Model.AcceleratorConfig, type: :list) + field(:name) + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.AcceleratorType do + def decode(value, options) do + GoogleApi.TPU.V2.Model.AcceleratorType.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.AcceleratorType do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/accepted_data.ex b/clients/tpu/lib/google_api/tpu/v2/model/accepted_data.ex new file mode 100644 index 0000000000..680253d38e --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/accepted_data.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.AcceptedData do + @moduledoc """ + Further data for the accepted state. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.AcceptedData do + def decode(value, options) do + GoogleApi.TPU.V2.Model.AcceptedData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.AcceptedData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/access_config.ex b/clients/tpu/lib/google_api/tpu/v2/model/access_config.ex new file mode 100644 index 0000000000..70629b8219 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/access_config.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.AccessConfig do + @moduledoc """ + An access config attached to the TPU worker. + + ## Attributes + + * `externalIp` (*type:* `String.t`, *default:* `nil`) - Output only. An external IP address associated with the TPU worker. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :externalIp => String.t() | nil + } + + field(:externalIp) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.AccessConfig do + def decode(value, options) do + GoogleApi.TPU.V2.Model.AccessConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.AccessConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/active_data.ex b/clients/tpu/lib/google_api/tpu/v2/model/active_data.ex new file mode 100644 index 0000000000..c5e7d29e69 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/active_data.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ActiveData do + @moduledoc """ + Further data for the active state. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ActiveData do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ActiveData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ActiveData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/attached_disk.ex b/clients/tpu/lib/google_api/tpu/v2/model/attached_disk.ex new file mode 100644 index 0000000000..24c974f573 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/attached_disk.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.AttachedDisk do + @moduledoc """ + A node-attached disk resource. Next ID: 8; + + ## Attributes + + * `mode` (*type:* `String.t`, *default:* `nil`) - The mode in which to attach this disk. If not specified, the default is READ_WRITE mode. Only applicable to data_disks. + * `sourceDisk` (*type:* `String.t`, *default:* `nil`) - Specifies the full path to an existing disk. For example: "projects/my-project/zones/us-central1-c/disks/my-disk". + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :mode => String.t() | nil, + :sourceDisk => String.t() | nil + } + + field(:mode) + field(:sourceDisk) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.AttachedDisk do + def decode(value, options) do + GoogleApi.TPU.V2.Model.AttachedDisk.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.AttachedDisk do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/creating_data.ex b/clients/tpu/lib/google_api/tpu/v2/model/creating_data.ex new file mode 100644 index 0000000000..2736604c24 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/creating_data.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.CreatingData do + @moduledoc """ + Further data for the creating state. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.CreatingData do + def decode(value, options) do + GoogleApi.TPU.V2.Model.CreatingData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.CreatingData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/deleting_data.ex b/clients/tpu/lib/google_api/tpu/v2/model/deleting_data.ex new file mode 100644 index 0000000000..1f9d3e5093 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/deleting_data.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.DeletingData do + @moduledoc """ + Further data for the deleting state. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.DeletingData do + def decode(value, options) do + GoogleApi.TPU.V2.Model.DeletingData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.DeletingData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/empty.ex b/clients/tpu/lib/google_api/tpu/v2/model/empty.ex new file mode 100644 index 0000000000..798a97cf5f --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/empty.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Empty do + @moduledoc """ + A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Empty do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Empty.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Empty do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/failed_data.ex b/clients/tpu/lib/google_api/tpu/v2/model/failed_data.ex new file mode 100644 index 0000000000..819a91101c --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/failed_data.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.FailedData do + @moduledoc """ + Further data for the failed state. + + ## Attributes + + * `error` (*type:* `GoogleApi.TPU.V2.Model.Status.t`, *default:* `nil`) - Output only. The error that caused the queued resource to enter the FAILED state. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :error => GoogleApi.TPU.V2.Model.Status.t() | nil + } + + field(:error, as: GoogleApi.TPU.V2.Model.Status) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.FailedData do + def decode(value, options) do + GoogleApi.TPU.V2.Model.FailedData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.FailedData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/generate_service_identity_request.ex b/clients/tpu/lib/google_api/tpu/v2/model/generate_service_identity_request.ex new file mode 100644 index 0000000000..6a6869b5e7 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/generate_service_identity_request.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.GenerateServiceIdentityRequest do + @moduledoc """ + Request for GenerateServiceIdentity. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.GenerateServiceIdentityRequest do + def decode(value, options) do + GoogleApi.TPU.V2.Model.GenerateServiceIdentityRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.GenerateServiceIdentityRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/generate_service_identity_response.ex b/clients/tpu/lib/google_api/tpu/v2/model/generate_service_identity_response.ex new file mode 100644 index 0000000000..3b00887fb7 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/generate_service_identity_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.GenerateServiceIdentityResponse do + @moduledoc """ + Response for GenerateServiceIdentity. + + ## Attributes + + * `identity` (*type:* `GoogleApi.TPU.V2.Model.ServiceIdentity.t`, *default:* `nil`) - ServiceIdentity that was created or retrieved. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :identity => GoogleApi.TPU.V2.Model.ServiceIdentity.t() | nil + } + + field(:identity, as: GoogleApi.TPU.V2.Model.ServiceIdentity) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.GenerateServiceIdentityResponse do + def decode(value, options) do + GoogleApi.TPU.V2.Model.GenerateServiceIdentityResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.GenerateServiceIdentityResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/get_guest_attributes_request.ex b/clients/tpu/lib/google_api/tpu/v2/model/get_guest_attributes_request.ex new file mode 100644 index 0000000000..912326dcd5 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/get_guest_attributes_request.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.GetGuestAttributesRequest do + @moduledoc """ + Request for GetGuestAttributes. + + ## Attributes + + * `queryPath` (*type:* `String.t`, *default:* `nil`) - The guest attributes path to be queried. + * `workerIds` (*type:* `list(String.t)`, *default:* `nil`) - The 0-based worker ID. If it is empty, all workers' GuestAttributes will be returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :queryPath => String.t() | nil, + :workerIds => list(String.t()) | nil + } + + field(:queryPath) + field(:workerIds, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.GetGuestAttributesRequest do + def decode(value, options) do + GoogleApi.TPU.V2.Model.GetGuestAttributesRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.GetGuestAttributesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/get_guest_attributes_response.ex b/clients/tpu/lib/google_api/tpu/v2/model/get_guest_attributes_response.ex new file mode 100644 index 0000000000..138dceaedb --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/get_guest_attributes_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.GetGuestAttributesResponse do + @moduledoc """ + Response for GetGuestAttributes. + + ## Attributes + + * `guestAttributes` (*type:* `list(GoogleApi.TPU.V2.Model.GuestAttributes.t)`, *default:* `nil`) - The guest attributes for the TPU workers. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :guestAttributes => list(GoogleApi.TPU.V2.Model.GuestAttributes.t()) | nil + } + + field(:guestAttributes, as: GoogleApi.TPU.V2.Model.GuestAttributes, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.GetGuestAttributesResponse do + def decode(value, options) do + GoogleApi.TPU.V2.Model.GetGuestAttributesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.GetGuestAttributesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/guaranteed.ex b/clients/tpu/lib/google_api/tpu/v2/model/guaranteed.ex new file mode 100644 index 0000000000..d28de241bd --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/guaranteed.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Guaranteed do + @moduledoc """ + Guaranteed tier definition. + + ## Attributes + + * `minDuration` (*type:* `String.t`, *default:* `nil`) - Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :minDuration => String.t() | nil + } + + field(:minDuration) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Guaranteed do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Guaranteed.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Guaranteed do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/guest_attributes.ex b/clients/tpu/lib/google_api/tpu/v2/model/guest_attributes.ex new file mode 100644 index 0000000000..a5514abf8d --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/guest_attributes.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.GuestAttributes do + @moduledoc """ + A guest attributes. + + ## Attributes + + * `queryPath` (*type:* `String.t`, *default:* `nil`) - The path to be queried. This can be the default namespace ('/') or a nested namespace ('/\\/') or a specified key ('/\\/\\') + * `queryValue` (*type:* `GoogleApi.TPU.V2.Model.GuestAttributesValue.t`, *default:* `nil`) - The value of the requested queried path. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :queryPath => String.t() | nil, + :queryValue => GoogleApi.TPU.V2.Model.GuestAttributesValue.t() | nil + } + + field(:queryPath) + field(:queryValue, as: GoogleApi.TPU.V2.Model.GuestAttributesValue) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.GuestAttributes do + def decode(value, options) do + GoogleApi.TPU.V2.Model.GuestAttributes.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.GuestAttributes do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/guest_attributes_entry.ex b/clients/tpu/lib/google_api/tpu/v2/model/guest_attributes_entry.ex new file mode 100644 index 0000000000..00da275ed5 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/guest_attributes_entry.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.GuestAttributesEntry do + @moduledoc """ + A guest attributes namespace/key/value entry. + + ## Attributes + + * `key` (*type:* `String.t`, *default:* `nil`) - Key for the guest attribute entry. + * `namespace` (*type:* `String.t`, *default:* `nil`) - Namespace for the guest attribute entry. + * `value` (*type:* `String.t`, *default:* `nil`) - Value for the guest attribute entry. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :key => String.t() | nil, + :namespace => String.t() | nil, + :value => String.t() | nil + } + + field(:key) + field(:namespace) + field(:value) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.GuestAttributesEntry do + def decode(value, options) do + GoogleApi.TPU.V2.Model.GuestAttributesEntry.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.GuestAttributesEntry do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/guest_attributes_value.ex b/clients/tpu/lib/google_api/tpu/v2/model/guest_attributes_value.ex new file mode 100644 index 0000000000..4a18836af9 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/guest_attributes_value.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.GuestAttributesValue do + @moduledoc """ + Array of guest attribute namespace/key/value tuples. + + ## Attributes + + * `items` (*type:* `list(GoogleApi.TPU.V2.Model.GuestAttributesEntry.t)`, *default:* `nil`) - The list of guest attributes entries. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :items => list(GoogleApi.TPU.V2.Model.GuestAttributesEntry.t()) | nil + } + + field(:items, as: GoogleApi.TPU.V2.Model.GuestAttributesEntry, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.GuestAttributesValue do + def decode(value, options) do + GoogleApi.TPU.V2.Model.GuestAttributesValue.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.GuestAttributesValue do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/interval.ex b/clients/tpu/lib/google_api/tpu/v2/model/interval.ex new file mode 100644 index 0000000000..9436d7f113 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/interval.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Interval do + @moduledoc """ + Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. + + ## Attributes + + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endTime => DateTime.t() | nil, + :startTime => DateTime.t() | nil + } + + field(:endTime, as: DateTime) + field(:startTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Interval do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Interval.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Interval do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/list_accelerator_types_response.ex b/clients/tpu/lib/google_api/tpu/v2/model/list_accelerator_types_response.ex new file mode 100644 index 0000000000..2fddc3715d --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/list_accelerator_types_response.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ListAcceleratorTypesResponse do + @moduledoc """ + Response for ListAcceleratorTypes. + + ## Attributes + + * `acceleratorTypes` (*type:* `list(GoogleApi.TPU.V2.Model.AcceleratorType.t)`, *default:* `nil`) - The listed nodes. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next page token or empty if none. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :acceleratorTypes => list(GoogleApi.TPU.V2.Model.AcceleratorType.t()) | nil, + :nextPageToken => String.t() | nil, + :unreachable => list(String.t()) | nil + } + + field(:acceleratorTypes, as: GoogleApi.TPU.V2.Model.AcceleratorType, type: :list) + field(:nextPageToken) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ListAcceleratorTypesResponse do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ListAcceleratorTypesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ListAcceleratorTypesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/list_locations_response.ex b/clients/tpu/lib/google_api/tpu/v2/model/list_locations_response.ex new file mode 100644 index 0000000000..c3bfc9e206 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/list_locations_response.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ListLocationsResponse do + @moduledoc """ + The response message for Locations.ListLocations. + + ## Attributes + + * `locations` (*type:* `list(GoogleApi.TPU.V2.Model.Location.t)`, *default:* `nil`) - A list of locations that matches the specified filter in the request. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The standard List next-page token. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :locations => list(GoogleApi.TPU.V2.Model.Location.t()) | nil, + :nextPageToken => String.t() | nil + } + + field(:locations, as: GoogleApi.TPU.V2.Model.Location, type: :list) + field(:nextPageToken) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ListLocationsResponse do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ListLocationsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ListLocationsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/list_nodes_response.ex b/clients/tpu/lib/google_api/tpu/v2/model/list_nodes_response.ex new file mode 100644 index 0000000000..1ee51521ed --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/list_nodes_response.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ListNodesResponse do + @moduledoc """ + Response for ListNodes. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next page token or empty if none. + * `nodes` (*type:* `list(GoogleApi.TPU.V2.Model.Node.t)`, *default:* `nil`) - The listed nodes. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :nodes => list(GoogleApi.TPU.V2.Model.Node.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + field(:nodes, as: GoogleApi.TPU.V2.Model.Node, type: :list) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ListNodesResponse do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ListNodesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ListNodesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/list_operations_response.ex b/clients/tpu/lib/google_api/tpu/v2/model/list_operations_response.ex new file mode 100644 index 0000000000..f954f4d9fd --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/list_operations_response.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ListOperationsResponse do + @moduledoc """ + The response message for Operations.ListOperations. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The standard List next-page token. + * `operations` (*type:* `list(GoogleApi.TPU.V2.Model.Operation.t)`, *default:* `nil`) - A list of operations that matches the specified filter in the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :operations => list(GoogleApi.TPU.V2.Model.Operation.t()) | nil + } + + field(:nextPageToken) + field(:operations, as: GoogleApi.TPU.V2.Model.Operation, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ListOperationsResponse do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ListOperationsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ListOperationsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/list_queued_resources_response.ex b/clients/tpu/lib/google_api/tpu/v2/model/list_queued_resources_response.ex new file mode 100644 index 0000000000..b6fd4d7c9b --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/list_queued_resources_response.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ListQueuedResourcesResponse do + @moduledoc """ + Response for ListQueuedResources. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next page token or empty if none. + * `queuedResources` (*type:* `list(GoogleApi.TPU.V2.Model.QueuedResource.t)`, *default:* `nil`) - The listed queued resources. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :queuedResources => list(GoogleApi.TPU.V2.Model.QueuedResource.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + field(:queuedResources, as: GoogleApi.TPU.V2.Model.QueuedResource, type: :list) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ListQueuedResourcesResponse do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ListQueuedResourcesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ListQueuedResourcesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/list_runtime_versions_response.ex b/clients/tpu/lib/google_api/tpu/v2/model/list_runtime_versions_response.ex new file mode 100644 index 0000000000..fb304e121a --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/list_runtime_versions_response.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ListRuntimeVersionsResponse do + @moduledoc """ + Response for ListRuntimeVersions. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next page token or empty if none. + * `runtimeVersions` (*type:* `list(GoogleApi.TPU.V2.Model.RuntimeVersion.t)`, *default:* `nil`) - The listed nodes. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :runtimeVersions => list(GoogleApi.TPU.V2.Model.RuntimeVersion.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + field(:runtimeVersions, as: GoogleApi.TPU.V2.Model.RuntimeVersion, type: :list) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ListRuntimeVersionsResponse do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ListRuntimeVersionsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ListRuntimeVersionsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/location.ex b/clients/tpu/lib/google_api/tpu/v2/model/location.ex new file mode 100644 index 0000000000..bd4ebe9b12 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/location.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Location do + @moduledoc """ + A resource that represents a Google Cloud location. + + ## Attributes + + * `displayName` (*type:* `String.t`, *default:* `nil`) - The friendly name for this location, typically a nearby city name. For example, "Tokyo". + * `labels` (*type:* `map()`, *default:* `nil`) - Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} + * `locationId` (*type:* `String.t`, *default:* `nil`) - The canonical id for this location. For example: `"us-east1"`. + * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata. For example the available capacity at the given location. + * `name` (*type:* `String.t`, *default:* `nil`) - Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :displayName => String.t() | nil, + :labels => map() | nil, + :locationId => String.t() | nil, + :metadata => map() | nil, + :name => String.t() | nil + } + + field(:displayName) + field(:labels, type: :map) + field(:locationId) + field(:metadata, type: :map) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Location do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Location.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Location do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/multislice_params.ex b/clients/tpu/lib/google_api/tpu/v2/model/multislice_params.ex new file mode 100644 index 0000000000..c444fa3695 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/multislice_params.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.MultisliceParams do + @moduledoc """ + Parameters to specify for multislice QueuedResource requests. This message must be populated in case of multislice requests instead of node_id. + + ## Attributes + + * `nodeCount` (*type:* `integer()`, *default:* `nil`) - Required. Number of nodes with this spec. The system will attempt to provison "node_count" nodes as part of the request. This needs to be > 1. + * `nodeIdPrefix` (*type:* `String.t`, *default:* `nil`) - Optional. Prefix of node_ids in case of multislice request. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. If node_count = 3 and node_id_prefix = "np", node ids of nodes created will be "np-0", "np-1", "np-2". If this field is not provided we use queued_resource_id as the node_id_prefix. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nodeCount => integer() | nil, + :nodeIdPrefix => String.t() | nil + } + + field(:nodeCount) + field(:nodeIdPrefix) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.MultisliceParams do + def decode(value, options) do + GoogleApi.TPU.V2.Model.MultisliceParams.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.MultisliceParams do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/network_config.ex b/clients/tpu/lib/google_api/tpu/v2/model/network_config.ex new file mode 100644 index 0000000000..be60ed93f7 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/network_config.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.NetworkConfig do + @moduledoc """ + Network related configurations. + + ## Attributes + + * `canIpForward` (*type:* `boolean()`, *default:* `nil`) - Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes. + * `enableExternalIps` (*type:* `boolean()`, *default:* `nil`) - Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled. + * `network` (*type:* `String.t`, *default:* `nil`) - The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, "default" will be used. + * `queueCount` (*type:* `integer()`, *default:* `nil`) - Optional. Specifies networking queue count for TPU VM instance's network interface. + * `subnetwork` (*type:* `String.t`, *default:* `nil`) - The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, "default" will be used. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :canIpForward => boolean() | nil, + :enableExternalIps => boolean() | nil, + :network => String.t() | nil, + :queueCount => integer() | nil, + :subnetwork => String.t() | nil + } + + field(:canIpForward) + field(:enableExternalIps) + field(:network) + field(:queueCount) + field(:subnetwork) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.NetworkConfig do + def decode(value, options) do + GoogleApi.TPU.V2.Model.NetworkConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.NetworkConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/network_endpoint.ex b/clients/tpu/lib/google_api/tpu/v2/model/network_endpoint.ex new file mode 100644 index 0000000000..b05a7b6131 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/network_endpoint.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.NetworkEndpoint do + @moduledoc """ + A network endpoint over which a TPU worker can be reached. + + ## Attributes + + * `accessConfig` (*type:* `GoogleApi.TPU.V2.Model.AccessConfig.t`, *default:* `nil`) - The access config for the TPU worker. + * `ipAddress` (*type:* `String.t`, *default:* `nil`) - The internal IP address of this network endpoint. + * `port` (*type:* `integer()`, *default:* `nil`) - The port of this network endpoint. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :accessConfig => GoogleApi.TPU.V2.Model.AccessConfig.t() | nil, + :ipAddress => String.t() | nil, + :port => integer() | nil + } + + field(:accessConfig, as: GoogleApi.TPU.V2.Model.AccessConfig) + field(:ipAddress) + field(:port) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.NetworkEndpoint do + def decode(value, options) do + GoogleApi.TPU.V2.Model.NetworkEndpoint.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.NetworkEndpoint do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/node.ex b/clients/tpu/lib/google_api/tpu/v2/model/node.ex new file mode 100644 index 0000000000..c952c2d1a5 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/node.ex @@ -0,0 +1,115 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Node do + @moduledoc """ + A TPU instance. + + ## Attributes + + * `acceleratorConfig` (*type:* `GoogleApi.TPU.V2.Model.AcceleratorConfig.t`, *default:* `nil`) - The AccleratorConfig for the TPU Node. + * `acceleratorType` (*type:* `String.t`, *default:* `nil`) - Optional. The type of hardware accelerators associated with this node. + * `apiVersion` (*type:* `String.t`, *default:* `nil`) - Output only. The API version that created this Node. + * `cidrBlock` (*type:* `String.t`, *default:* `nil`) - The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the node was created. + * `dataDisks` (*type:* `list(GoogleApi.TPU.V2.Model.AttachedDisk.t)`, *default:* `nil`) - The additional data disks for the Node. + * `description` (*type:* `String.t`, *default:* `nil`) - The user-supplied description of the TPU. Maximum of 512 characters. + * `health` (*type:* `String.t`, *default:* `nil`) - The health status of the TPU node. + * `healthDescription` (*type:* `String.t`, *default:* `nil`) - Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy. + * `id` (*type:* `String.t`, *default:* `nil`) - Output only. The unique identifier for the TPU Node. + * `labels` (*type:* `map()`, *default:* `nil`) - Resource labels to represent user-provided metadata. + * `metadata` (*type:* `map()`, *default:* `nil`) - Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script + * `multisliceNode` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether the Node belongs to a Multislice group. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. The name of the TPU. + * `networkConfig` (*type:* `GoogleApi.TPU.V2.Model.NetworkConfig.t`, *default:* `nil`) - Network configurations for the TPU node. + * `networkEndpoints` (*type:* `list(GoogleApi.TPU.V2.Model.NetworkEndpoint.t)`, *default:* `nil`) - Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first. + * `queuedResource` (*type:* `String.t`, *default:* `nil`) - Output only. The qualified name of the QueuedResource that requested this Node. + * `runtimeVersion` (*type:* `String.t`, *default:* `nil`) - Required. The runtime version running in the Node. + * `schedulingConfig` (*type:* `GoogleApi.TPU.V2.Model.SchedulingConfig.t`, *default:* `nil`) - The scheduling options for this node. + * `serviceAccount` (*type:* `GoogleApi.TPU.V2.Model.ServiceAccount.t`, *default:* `nil`) - The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is specified, the default compute service account will be used. + * `shieldedInstanceConfig` (*type:* `GoogleApi.TPU.V2.Model.ShieldedInstanceConfig.t`, *default:* `nil`) - Shielded Instance options. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current state for the TPU Node. + * `symptoms` (*type:* `list(GoogleApi.TPU.V2.Model.Symptom.t)`, *default:* `nil`) - Output only. The Symptoms that have occurred to the TPU Node. + * `tags` (*type:* `list(String.t)`, *default:* `nil`) - Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :acceleratorConfig => GoogleApi.TPU.V2.Model.AcceleratorConfig.t() | nil, + :acceleratorType => String.t() | nil, + :apiVersion => String.t() | nil, + :cidrBlock => String.t() | nil, + :createTime => DateTime.t() | nil, + :dataDisks => list(GoogleApi.TPU.V2.Model.AttachedDisk.t()) | nil, + :description => String.t() | nil, + :health => String.t() | nil, + :healthDescription => String.t() | nil, + :id => String.t() | nil, + :labels => map() | nil, + :metadata => map() | nil, + :multisliceNode => boolean() | nil, + :name => String.t() | nil, + :networkConfig => GoogleApi.TPU.V2.Model.NetworkConfig.t() | nil, + :networkEndpoints => list(GoogleApi.TPU.V2.Model.NetworkEndpoint.t()) | nil, + :queuedResource => String.t() | nil, + :runtimeVersion => String.t() | nil, + :schedulingConfig => GoogleApi.TPU.V2.Model.SchedulingConfig.t() | nil, + :serviceAccount => GoogleApi.TPU.V2.Model.ServiceAccount.t() | nil, + :shieldedInstanceConfig => GoogleApi.TPU.V2.Model.ShieldedInstanceConfig.t() | nil, + :state => String.t() | nil, + :symptoms => list(GoogleApi.TPU.V2.Model.Symptom.t()) | nil, + :tags => list(String.t()) | nil + } + + field(:acceleratorConfig, as: GoogleApi.TPU.V2.Model.AcceleratorConfig) + field(:acceleratorType) + field(:apiVersion) + field(:cidrBlock) + field(:createTime, as: DateTime) + field(:dataDisks, as: GoogleApi.TPU.V2.Model.AttachedDisk, type: :list) + field(:description) + field(:health) + field(:healthDescription) + field(:id) + field(:labels, type: :map) + field(:metadata, type: :map) + field(:multisliceNode) + field(:name) + field(:networkConfig, as: GoogleApi.TPU.V2.Model.NetworkConfig) + field(:networkEndpoints, as: GoogleApi.TPU.V2.Model.NetworkEndpoint, type: :list) + field(:queuedResource) + field(:runtimeVersion) + field(:schedulingConfig, as: GoogleApi.TPU.V2.Model.SchedulingConfig) + field(:serviceAccount, as: GoogleApi.TPU.V2.Model.ServiceAccount) + field(:shieldedInstanceConfig, as: GoogleApi.TPU.V2.Model.ShieldedInstanceConfig) + field(:state) + field(:symptoms, as: GoogleApi.TPU.V2.Model.Symptom, type: :list) + field(:tags, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Node do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Node.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Node do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/node_spec.ex b/clients/tpu/lib/google_api/tpu/v2/model/node_spec.ex new file mode 100644 index 0000000000..f75c0c1b81 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/node_spec.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.NodeSpec do + @moduledoc """ + Details of the TPU node(s) being requested. Users can request either a single node or multiple nodes. NodeSpec provides the specification for node(s) to be created. + + ## Attributes + + * `multisliceParams` (*type:* `GoogleApi.TPU.V2.Model.MultisliceParams.t`, *default:* `nil`) - Optional. Fields to specify in case of multislice request. + * `node` (*type:* `GoogleApi.TPU.V2.Model.Node.t`, *default:* `nil`) - Required. The node. + * `nodeId` (*type:* `String.t`, *default:* `nil`) - Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting a single node. In case of multislice requests, multislice_params must be populated instead. + * `parent` (*type:* `String.t`, *default:* `nil`) - Required. The parent resource name. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :multisliceParams => GoogleApi.TPU.V2.Model.MultisliceParams.t() | nil, + :node => GoogleApi.TPU.V2.Model.Node.t() | nil, + :nodeId => String.t() | nil, + :parent => String.t() | nil + } + + field(:multisliceParams, as: GoogleApi.TPU.V2.Model.MultisliceParams) + field(:node, as: GoogleApi.TPU.V2.Model.Node) + field(:nodeId) + field(:parent) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.NodeSpec do + def decode(value, options) do + GoogleApi.TPU.V2.Model.NodeSpec.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.NodeSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/operation.ex b/clients/tpu/lib/google_api/tpu/v2/model/operation.ex new file mode 100644 index 0000000000..8265bc499b --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/operation.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Operation do + @moduledoc """ + This resource represents a long-running operation that is the result of a network API call. + + ## Attributes + + * `done` (*type:* `boolean()`, *default:* `nil`) - If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + * `error` (*type:* `GoogleApi.TPU.V2.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. + * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :done => boolean() | nil, + :error => GoogleApi.TPU.V2.Model.Status.t() | nil, + :metadata => map() | nil, + :name => String.t() | nil, + :response => map() | nil + } + + field(:done) + field(:error, as: GoogleApi.TPU.V2.Model.Status) + field(:metadata, type: :map) + field(:name) + field(:response, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Operation do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Operation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Operation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/operation_metadata.ex b/clients/tpu/lib/google_api/tpu/v2/model/operation_metadata.ex new file mode 100644 index 0000000000..3e47a17276 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/operation_metadata.ex @@ -0,0 +1,64 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.OperationMetadata do + @moduledoc """ + Metadata describing an Operation + + ## Attributes + + * `apiVersion` (*type:* `String.t`, *default:* `nil`) - API version. + * `cancelRequested` (*type:* `boolean()`, *default:* `nil`) - Specifies if cancellation was requested for the operation. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the operation was created. + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the operation finished running. + * `statusDetail` (*type:* `String.t`, *default:* `nil`) - Human-readable status of the operation, if any. + * `target` (*type:* `String.t`, *default:* `nil`) - Target of the operation - for example projects/project-1/connectivityTests/test-1 + * `verb` (*type:* `String.t`, *default:* `nil`) - Name of the verb executed by the operation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :apiVersion => String.t() | nil, + :cancelRequested => boolean() | nil, + :createTime => DateTime.t() | nil, + :endTime => DateTime.t() | nil, + :statusDetail => String.t() | nil, + :target => String.t() | nil, + :verb => String.t() | nil + } + + field(:apiVersion) + field(:cancelRequested) + field(:createTime, as: DateTime) + field(:endTime, as: DateTime) + field(:statusDetail) + field(:target) + field(:verb) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.OperationMetadata do + def decode(value, options) do + GoogleApi.TPU.V2.Model.OperationMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.OperationMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/provisioning_data.ex b/clients/tpu/lib/google_api/tpu/v2/model/provisioning_data.ex new file mode 100644 index 0000000000..40bfe451c3 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/provisioning_data.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ProvisioningData do + @moduledoc """ + Further data for the provisioning state. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ProvisioningData do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ProvisioningData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ProvisioningData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/queued_resource.ex b/clients/tpu/lib/google_api/tpu/v2/model/queued_resource.ex new file mode 100644 index 0000000000..d15b029814 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/queued_resource.ex @@ -0,0 +1,67 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.QueuedResource do + @moduledoc """ + A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the QueuedResource was created. + * `guaranteed` (*type:* `GoogleApi.TPU.V2.Model.Guaranteed.t`, *default:* `nil`) - Optional. The Guaranteed tier + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. The name of the QueuedResource. + * `queueingPolicy` (*type:* `GoogleApi.TPU.V2.Model.QueueingPolicy.t`, *default:* `nil`) - Optional. The queueing policy of the QueuedRequest. + * `reservationName` (*type:* `String.t`, *default:* `nil`) - Optional. Name of the reservation in which the resource should be provisioned. Format: projects/{project}/locations/{zone}/reservations/{reservation} + * `spot` (*type:* `GoogleApi.TPU.V2.Model.Spot.t`, *default:* `nil`) - Optional. The Spot tier. + * `state` (*type:* `GoogleApi.TPU.V2.Model.QueuedResourceState.t`, *default:* `nil`) - Output only. State of the QueuedResource request. + * `tpu` (*type:* `GoogleApi.TPU.V2.Model.Tpu.t`, *default:* `nil`) - Optional. Defines a TPU resource. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :guaranteed => GoogleApi.TPU.V2.Model.Guaranteed.t() | nil, + :name => String.t() | nil, + :queueingPolicy => GoogleApi.TPU.V2.Model.QueueingPolicy.t() | nil, + :reservationName => String.t() | nil, + :spot => GoogleApi.TPU.V2.Model.Spot.t() | nil, + :state => GoogleApi.TPU.V2.Model.QueuedResourceState.t() | nil, + :tpu => GoogleApi.TPU.V2.Model.Tpu.t() | nil + } + + field(:createTime, as: DateTime) + field(:guaranteed, as: GoogleApi.TPU.V2.Model.Guaranteed) + field(:name) + field(:queueingPolicy, as: GoogleApi.TPU.V2.Model.QueueingPolicy) + field(:reservationName) + field(:spot, as: GoogleApi.TPU.V2.Model.Spot) + field(:state, as: GoogleApi.TPU.V2.Model.QueuedResourceState) + field(:tpu, as: GoogleApi.TPU.V2.Model.Tpu) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.QueuedResource do + def decode(value, options) do + GoogleApi.TPU.V2.Model.QueuedResource.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.QueuedResource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/queued_resource_state.ex b/clients/tpu/lib/google_api/tpu/v2/model/queued_resource_state.ex new file mode 100644 index 0000000000..e24b53a84b --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/queued_resource_state.ex @@ -0,0 +1,73 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.QueuedResourceState do + @moduledoc """ + QueuedResourceState defines the details of the QueuedResource request. + + ## Attributes + + * `acceptedData` (*type:* `GoogleApi.TPU.V2.Model.AcceptedData.t`, *default:* `nil`) - Output only. Further data for the accepted state. + * `activeData` (*type:* `GoogleApi.TPU.V2.Model.ActiveData.t`, *default:* `nil`) - Output only. Further data for the active state. + * `creatingData` (*type:* `GoogleApi.TPU.V2.Model.CreatingData.t`, *default:* `nil`) - Output only. Further data for the creating state. + * `deletingData` (*type:* `GoogleApi.TPU.V2.Model.DeletingData.t`, *default:* `nil`) - Output only. Further data for the deleting state. + * `failedData` (*type:* `GoogleApi.TPU.V2.Model.FailedData.t`, *default:* `nil`) - Output only. Further data for the failed state. + * `provisioningData` (*type:* `GoogleApi.TPU.V2.Model.ProvisioningData.t`, *default:* `nil`) - Output only. Further data for the provisioning state. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of the QueuedResource request. + * `stateInitiator` (*type:* `String.t`, *default:* `nil`) - Output only. The initiator of the QueuedResources's current state. Used to indicate whether the SUSPENDING/SUSPENDED state was initiated by the user or the service. + * `suspendedData` (*type:* `GoogleApi.TPU.V2.Model.SuspendedData.t`, *default:* `nil`) - Output only. Further data for the suspended state. + * `suspendingData` (*type:* `GoogleApi.TPU.V2.Model.SuspendingData.t`, *default:* `nil`) - Output only. Further data for the suspending state. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :acceptedData => GoogleApi.TPU.V2.Model.AcceptedData.t() | nil, + :activeData => GoogleApi.TPU.V2.Model.ActiveData.t() | nil, + :creatingData => GoogleApi.TPU.V2.Model.CreatingData.t() | nil, + :deletingData => GoogleApi.TPU.V2.Model.DeletingData.t() | nil, + :failedData => GoogleApi.TPU.V2.Model.FailedData.t() | nil, + :provisioningData => GoogleApi.TPU.V2.Model.ProvisioningData.t() | nil, + :state => String.t() | nil, + :stateInitiator => String.t() | nil, + :suspendedData => GoogleApi.TPU.V2.Model.SuspendedData.t() | nil, + :suspendingData => GoogleApi.TPU.V2.Model.SuspendingData.t() | nil + } + + field(:acceptedData, as: GoogleApi.TPU.V2.Model.AcceptedData) + field(:activeData, as: GoogleApi.TPU.V2.Model.ActiveData) + field(:creatingData, as: GoogleApi.TPU.V2.Model.CreatingData) + field(:deletingData, as: GoogleApi.TPU.V2.Model.DeletingData) + field(:failedData, as: GoogleApi.TPU.V2.Model.FailedData) + field(:provisioningData, as: GoogleApi.TPU.V2.Model.ProvisioningData) + field(:state) + field(:stateInitiator) + field(:suspendedData, as: GoogleApi.TPU.V2.Model.SuspendedData) + field(:suspendingData, as: GoogleApi.TPU.V2.Model.SuspendingData) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.QueuedResourceState do + def decode(value, options) do + GoogleApi.TPU.V2.Model.QueuedResourceState.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.QueuedResourceState do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/queueing_policy.ex b/clients/tpu/lib/google_api/tpu/v2/model/queueing_policy.ex new file mode 100644 index 0000000000..71bae72528 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/queueing_policy.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.QueueingPolicy do + @moduledoc """ + Defines the policy of the QueuedRequest. + + ## Attributes + + * `validAfterDuration` (*type:* `String.t`, *default:* `nil`) - Optional. A relative time after which resources may be created. + * `validAfterTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. An absolute time after which resources may be created. + * `validInterval` (*type:* `GoogleApi.TPU.V2.Model.Interval.t`, *default:* `nil`) - Optional. An absolute time interval within which resources may be created. + * `validUntilDuration` (*type:* `String.t`, *default:* `nil`) - Optional. A relative time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed. + * `validUntilTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. An absolute time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :validAfterDuration => String.t() | nil, + :validAfterTime => DateTime.t() | nil, + :validInterval => GoogleApi.TPU.V2.Model.Interval.t() | nil, + :validUntilDuration => String.t() | nil, + :validUntilTime => DateTime.t() | nil + } + + field(:validAfterDuration) + field(:validAfterTime, as: DateTime) + field(:validInterval, as: GoogleApi.TPU.V2.Model.Interval) + field(:validUntilDuration) + field(:validUntilTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.QueueingPolicy do + def decode(value, options) do + GoogleApi.TPU.V2.Model.QueueingPolicy.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.QueueingPolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/reset_queued_resource_request.ex b/clients/tpu/lib/google_api/tpu/v2/model/reset_queued_resource_request.ex new file mode 100644 index 0000000000..6a4e4014e2 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/reset_queued_resource_request.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ResetQueuedResourceRequest do + @moduledoc """ + Request for ResetQueuedResource. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ResetQueuedResourceRequest do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ResetQueuedResourceRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ResetQueuedResourceRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/runtime_version.ex b/clients/tpu/lib/google_api/tpu/v2/model/runtime_version.ex new file mode 100644 index 0000000000..33a8fd0c97 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/runtime_version.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.RuntimeVersion do + @moduledoc """ + A runtime version that a Node can be configured with. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - The resource name. + * `version` (*type:* `String.t`, *default:* `nil`) - The runtime version. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :version => String.t() | nil + } + + field(:name) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.RuntimeVersion do + def decode(value, options) do + GoogleApi.TPU.V2.Model.RuntimeVersion.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.RuntimeVersion do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/scheduling_config.ex b/clients/tpu/lib/google_api/tpu/v2/model/scheduling_config.ex new file mode 100644 index 0000000000..ed3cb1c602 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/scheduling_config.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.SchedulingConfig do + @moduledoc """ + Sets the scheduling options for this node. + + ## Attributes + + * `preemptible` (*type:* `boolean()`, *default:* `nil`) - Defines whether the node is preemptible. + * `reserved` (*type:* `boolean()`, *default:* `nil`) - Whether the node is created under a reservation. + * `spot` (*type:* `boolean()`, *default:* `nil`) - Optional. Defines whether the node is Spot VM. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :preemptible => boolean() | nil, + :reserved => boolean() | nil, + :spot => boolean() | nil + } + + field(:preemptible) + field(:reserved) + field(:spot) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.SchedulingConfig do + def decode(value, options) do + GoogleApi.TPU.V2.Model.SchedulingConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.SchedulingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/service_account.ex b/clients/tpu/lib/google_api/tpu/v2/model/service_account.ex new file mode 100644 index 0000000000..3cc2958323 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/service_account.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ServiceAccount do + @moduledoc """ + A service account. + + ## Attributes + + * `email` (*type:* `String.t`, *default:* `nil`) - Email address of the service account. If empty, default Compute service account will be used. + * `scope` (*type:* `list(String.t)`, *default:* `nil`) - The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :email => String.t() | nil, + :scope => list(String.t()) | nil + } + + field(:email) + field(:scope, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ServiceAccount do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ServiceAccount.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ServiceAccount do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/service_identity.ex b/clients/tpu/lib/google_api/tpu/v2/model/service_identity.ex new file mode 100644 index 0000000000..94390d0917 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/service_identity.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ServiceIdentity do + @moduledoc """ + The per-product per-project service identity for Cloud TPU service. + + ## Attributes + + * `email` (*type:* `String.t`, *default:* `nil`) - The email address of the service identity. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :email => String.t() | nil + } + + field(:email) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ServiceIdentity do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ServiceIdentity.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ServiceIdentity do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/shielded_instance_config.ex b/clients/tpu/lib/google_api/tpu/v2/model/shielded_instance_config.ex new file mode 100644 index 0000000000..9994433039 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/shielded_instance_config.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.ShieldedInstanceConfig do + @moduledoc """ + A set of Shielded Instance options. + + ## Attributes + + * `enableSecureBoot` (*type:* `boolean()`, *default:* `nil`) - Defines whether the instance has Secure Boot enabled. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :enableSecureBoot => boolean() | nil + } + + field(:enableSecureBoot) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.ShieldedInstanceConfig do + def decode(value, options) do + GoogleApi.TPU.V2.Model.ShieldedInstanceConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.ShieldedInstanceConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/spot.ex b/clients/tpu/lib/google_api/tpu/v2/model/spot.ex new file mode 100644 index 0000000000..ff93783cb2 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/spot.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Spot do + @moduledoc """ + Spot tier definition. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Spot do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Spot.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Spot do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/start_node_request.ex b/clients/tpu/lib/google_api/tpu/v2/model/start_node_request.ex new file mode 100644 index 0000000000..72fca69677 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/start_node_request.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.StartNodeRequest do + @moduledoc """ + Request for StartNode. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.StartNodeRequest do + def decode(value, options) do + GoogleApi.TPU.V2.Model.StartNodeRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.StartNodeRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/status.ex b/clients/tpu/lib/google_api/tpu/v2/model/status.ex new file mode 100644 index 0000000000..66909e9588 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/status.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Status do + @moduledoc """ + The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + + ## Attributes + + * `code` (*type:* `integer()`, *default:* `nil`) - The status code, which should be an enum value of google.rpc.Code. + * `details` (*type:* `list(map())`, *default:* `nil`) - A list of messages that carry the error details. There is a common set of message types for APIs to use. + * `message` (*type:* `String.t`, *default:* `nil`) - A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :code => integer() | nil, + :details => list(map()) | nil, + :message => String.t() | nil + } + + field(:code) + field(:details, type: :list) + field(:message) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Status do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Status.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Status do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/stop_node_request.ex b/clients/tpu/lib/google_api/tpu/v2/model/stop_node_request.ex new file mode 100644 index 0000000000..1f35d234d6 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/stop_node_request.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.StopNodeRequest do + @moduledoc """ + Request for StopNode. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.StopNodeRequest do + def decode(value, options) do + GoogleApi.TPU.V2.Model.StopNodeRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.StopNodeRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/suspended_data.ex b/clients/tpu/lib/google_api/tpu/v2/model/suspended_data.ex new file mode 100644 index 0000000000..ff1f96d9f8 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/suspended_data.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.SuspendedData do + @moduledoc """ + Further data for the suspended state. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.SuspendedData do + def decode(value, options) do + GoogleApi.TPU.V2.Model.SuspendedData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.SuspendedData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/suspending_data.ex b/clients/tpu/lib/google_api/tpu/v2/model/suspending_data.ex new file mode 100644 index 0000000000..3f5ec51721 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/suspending_data.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.SuspendingData do + @moduledoc """ + Further data for the suspending state. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.SuspendingData do + def decode(value, options) do + GoogleApi.TPU.V2.Model.SuspendingData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.SuspendingData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/symptom.ex b/clients/tpu/lib/google_api/tpu/v2/model/symptom.ex new file mode 100644 index 0000000000..f40a484fe7 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/symptom.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Symptom do + @moduledoc """ + A Symptom instance. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Timestamp when the Symptom is created. + * `details` (*type:* `String.t`, *default:* `nil`) - Detailed information of the current Symptom. + * `symptomType` (*type:* `String.t`, *default:* `nil`) - Type of the Symptom. + * `workerId` (*type:* `String.t`, *default:* `nil`) - A string used to uniquely distinguish a worker within a TPU node. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :details => String.t() | nil, + :symptomType => String.t() | nil, + :workerId => String.t() | nil + } + + field(:createTime, as: DateTime) + field(:details) + field(:symptomType) + field(:workerId) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Symptom do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Symptom.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Symptom do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/lib/google_api/tpu/v2/model/tpu.ex b/clients/tpu/lib/google_api/tpu/v2/model/tpu.ex new file mode 100644 index 0000000000..c936d5b8e4 --- /dev/null +++ b/clients/tpu/lib/google_api/tpu/v2/model/tpu.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.TPU.V2.Model.Tpu do + @moduledoc """ + Details of the TPU resource(s) being requested. + + ## Attributes + + * `nodeSpec` (*type:* `list(GoogleApi.TPU.V2.Model.NodeSpec.t)`, *default:* `nil`) - Optional. The TPU node(s) being requested. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nodeSpec => list(GoogleApi.TPU.V2.Model.NodeSpec.t()) | nil + } + + field(:nodeSpec, as: GoogleApi.TPU.V2.Model.NodeSpec, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TPU.V2.Model.Tpu do + def decode(value, options) do + GoogleApi.TPU.V2.Model.Tpu.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TPU.V2.Model.Tpu do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/tpu/mix.exs b/clients/tpu/mix.exs index 8a734190f0..70c28fd21e 100644 --- a/clients/tpu/mix.exs +++ b/clients/tpu/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.TPU.Mixfile do use Mix.Project - @version "0.15.5" + @version "0.16.0" def project() do [