All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.tpu.v2.TPU Maven / Gradle / Ivy

There is a newer version: v2-rev20241126-2.0.0
Show newest version
/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.tpu.v2;

/**
 * Service definition for TPU (v2).
 *
 * 

* TPU API provides customers with access to Google TPU technology. *

* *

* For more information about this service, see the * API Documentation *

* *

* This service uses {@link TPURequestInitializer} to initialize global parameters via its * {@link Builder}. *

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class TPU extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { // Note: Leave this static initializer at the top of the file. static { com.google.api.client.util.Preconditions.checkState( (com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 32 || (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 && com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1))) || com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION >= 2, "You are currently running with version %s of google-api-client. " + "You need at least version 1.31.1 of google-api-client to run version " + "2.0.0 of the Cloud TPU API library.", com.google.api.client.googleapis.GoogleUtils.VERSION); } /** * The default encoded root URL of the service. This is determined when the library is generated * and normally should not be changed. * * @since 1.7 */ public static final String DEFAULT_ROOT_URL = "https://tpu.googleapis.com/"; /** * The default encoded mTLS root URL of the service. This is determined when the library is generated * and normally should not be changed. * * @since 1.31 */ public static final String DEFAULT_MTLS_ROOT_URL = "https://tpu.mtls.googleapis.com/"; /** * The default encoded service path of the service. This is determined when the library is * generated and normally should not be changed. * * @since 1.7 */ public static final String DEFAULT_SERVICE_PATH = ""; /** * The default encoded batch path of the service. This is determined when the library is * generated and normally should not be changed. * * @since 1.23 */ public static final String DEFAULT_BATCH_PATH = "batch"; /** * The default encoded base URL of the service. This is determined when the library is generated * and normally should not be changed. */ public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; /** * Constructor. * *

* Use {@link Builder} if you need to specify any of the optional parameters. *

* * @param transport HTTP transport, which should normally be: *
    *
  • Google App Engine: * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • *
  • Android: {@code newCompatibleTransport} from * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} *
  • *
* @param jsonFactory JSON factory, which may be: *
    *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • *
  • Android Honeycomb or higher: * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • *
* @param httpRequestInitializer HTTP request initializer or {@code null} for none * @since 1.7 */ public TPU(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { this(new Builder(transport, jsonFactory, httpRequestInitializer)); } /** * @param builder builder */ TPU(Builder builder) { super(builder); } @Override protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { super.initialize(httpClientRequest); } /** * An accessor for creating requests from the Projects collection. * *

The typical use is:

*
   *   {@code TPU tpu = new TPU(...);}
   *   {@code TPU.Projects.List request = tpu.projects().list(parameters ...)}
   * 
* * @return the resource collection */ public Projects projects() { return new Projects(); } /** * The "projects" collection of methods. */ public class Projects { /** * An accessor for creating requests from the Locations collection. * *

The typical use is:

*
     *   {@code TPU tpu = new TPU(...);}
     *   {@code TPU.Locations.List request = tpu.locations().list(parameters ...)}
     * 
* * @return the resource collection */ public Locations locations() { return new Locations(); } /** * The "locations" collection of methods. */ public class Locations { /** * Generates the Cloud TPU service identity for the project. * * Create a request for the method "locations.generateServiceIdentity". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link GenerateServiceIdentity#execute()} method to invoke the remote * operation. * * @param parent Required. The parent resource name. * @param content the {@link com.google.api.services.tpu.v2.model.GenerateServiceIdentityRequest} * @return the request */ public GenerateServiceIdentity generateServiceIdentity(java.lang.String parent, com.google.api.services.tpu.v2.model.GenerateServiceIdentityRequest content) throws java.io.IOException { GenerateServiceIdentity result = new GenerateServiceIdentity(parent, content); initialize(result); return result; } public class GenerateServiceIdentity extends TPURequest { private static final String REST_PATH = "v2/{+parent}:generateServiceIdentity"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Generates the Cloud TPU service identity for the project. * * Create a request for the method "locations.generateServiceIdentity". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link GenerateServiceIdentity#execute()} method to invoke the remote * operation.

{@link GenerateServiceIdentity#initialize(com.google.api.client.googleapis.servi * ces.AbstractGoogleClientRequest)} must be called to initialize this instance immediately after * invoking the constructor.

* * @param parent Required. The parent resource name. * @param content the {@link com.google.api.services.tpu.v2.model.GenerateServiceIdentityRequest} * @since 1.13 */ protected GenerateServiceIdentity(java.lang.String parent, com.google.api.services.tpu.v2.model.GenerateServiceIdentityRequest content) { super(TPU.this, "POST", REST_PATH, content, com.google.api.services.tpu.v2.model.GenerateServiceIdentityResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public GenerateServiceIdentity set$Xgafv(java.lang.String $Xgafv) { return (GenerateServiceIdentity) super.set$Xgafv($Xgafv); } @Override public GenerateServiceIdentity setAccessToken(java.lang.String accessToken) { return (GenerateServiceIdentity) super.setAccessToken(accessToken); } @Override public GenerateServiceIdentity setAlt(java.lang.String alt) { return (GenerateServiceIdentity) super.setAlt(alt); } @Override public GenerateServiceIdentity setCallback(java.lang.String callback) { return (GenerateServiceIdentity) super.setCallback(callback); } @Override public GenerateServiceIdentity setFields(java.lang.String fields) { return (GenerateServiceIdentity) super.setFields(fields); } @Override public GenerateServiceIdentity setKey(java.lang.String key) { return (GenerateServiceIdentity) super.setKey(key); } @Override public GenerateServiceIdentity setOauthToken(java.lang.String oauthToken) { return (GenerateServiceIdentity) super.setOauthToken(oauthToken); } @Override public GenerateServiceIdentity setPrettyPrint(java.lang.Boolean prettyPrint) { return (GenerateServiceIdentity) super.setPrettyPrint(prettyPrint); } @Override public GenerateServiceIdentity setQuotaUser(java.lang.String quotaUser) { return (GenerateServiceIdentity) super.setQuotaUser(quotaUser); } @Override public GenerateServiceIdentity setUploadType(java.lang.String uploadType) { return (GenerateServiceIdentity) super.setUploadType(uploadType); } @Override public GenerateServiceIdentity setUploadProtocol(java.lang.String uploadProtocol) { return (GenerateServiceIdentity) super.setUploadProtocol(uploadProtocol); } /** Required. The parent resource name. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent resource name. */ public java.lang.String getParent() { return parent; } /** Required. The parent resource name. */ public GenerateServiceIdentity setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } @Override public GenerateServiceIdentity set(String parameterName, Object value) { return (GenerateServiceIdentity) super.set(parameterName, value); } } /** * Gets information about a location. * * Create a request for the method "locations.get". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Resource name for the location. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Gets information about a location. * * Create a request for the method "locations.get". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name Resource name for the location. * @since 1.13 */ protected Get(java.lang.String name) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.Location.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Resource name for the location. */ @com.google.api.client.util.Key private java.lang.String name; /** Resource name for the location. */ public java.lang.String getName() { return name; } /** Resource name for the location. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists information about the supported locations for this service. * * Create a request for the method "locations.list". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param name The resource that owns the locations collection, if applicable. * @return the request */ public List list(java.lang.String name) throws java.io.IOException { List result = new List(name); initialize(result); return result; } public class List extends TPURequest { private static final String REST_PATH = "v2/{+name}/locations"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+$"); /** * Lists information about the supported locations for this service. * * Create a request for the method "locations.list". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The resource that owns the locations collection, if applicable. * @since 1.13 */ protected List(java.lang.String name) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.ListLocationsResponse.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** The resource that owns the locations collection, if applicable. */ @com.google.api.client.util.Key private java.lang.String name; /** The resource that owns the locations collection, if applicable. */ public java.lang.String getName() { return name; } /** The resource that owns the locations collection, if applicable. */ public List setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+$"); } this.name = name; return this; } /** * 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). */ @com.google.api.client.util.Key private java.lang.String filter; /** 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). */ public java.lang.String getFilter() { return filter; } /** * 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). */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** The maximum number of results to return. If not set, the service selects a default. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of results to return. If not set, the service selects a default. */ public java.lang.Integer getPageSize() { return pageSize; } /** The maximum number of results to return. If not set, the service selects a default. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * A page token received from the `next_page_token` field in the response. Send that page * token to receive the subsequent page. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ public java.lang.String getPageToken() { return pageToken; } /** * A page token received from the `next_page_token` field in the response. Send that page * token to receive the subsequent page. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * An accessor for creating requests from the AcceleratorTypes collection. * *

The typical use is:

*
       *   {@code TPU tpu = new TPU(...);}
       *   {@code TPU.AcceleratorTypes.List request = tpu.acceleratorTypes().list(parameters ...)}
       * 
* * @return the resource collection */ public AcceleratorTypes acceleratorTypes() { return new AcceleratorTypes(); } /** * The "acceleratorTypes" collection of methods. */ public class AcceleratorTypes { /** * Gets AcceleratorType. * * Create a request for the method "acceleratorTypes.get". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Required. The resource name. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$"); /** * Gets AcceleratorType. * * Create a request for the method "acceleratorTypes.get". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name Required. The resource name. * @since 1.13 */ protected Get(java.lang.String name) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.AcceleratorType.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Required. The resource name. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name. */ public java.lang.String getName() { return name; } /** Required. The resource name. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists accelerator types supported by this API. * * Create a request for the method "acceleratorTypes.list". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The parent resource name. * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends TPURequest { private static final String REST_PATH = "v2/{+parent}/acceleratorTypes"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists accelerator types supported by this API. * * Create a request for the method "acceleratorTypes.list". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent resource name. * @since 1.13 */ protected List(java.lang.String parent) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.ListAcceleratorTypesResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Required. The parent resource name. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent resource name. */ public java.lang.String getParent() { return parent; } /** Required. The parent resource name. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** List filter. */ @com.google.api.client.util.Key private java.lang.String filter; /** List filter. */ public java.lang.String getFilter() { return filter; } /** List filter. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** Sort results. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sort results. */ public java.lang.String getOrderBy() { return orderBy; } /** Sort results. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** The maximum number of items to return. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of items to return. */ public java.lang.Integer getPageSize() { return pageSize; } /** The maximum number of items to return. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** The next_page_token value returned from a previous List request, if any. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The next_page_token value returned from a previous List request, if any. */ public java.lang.String getPageToken() { return pageToken; } /** The next_page_token value returned from a previous List request, if any. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Nodes collection. * *

The typical use is:

*
       *   {@code TPU tpu = new TPU(...);}
       *   {@code TPU.Nodes.List request = tpu.nodes().list(parameters ...)}
       * 
* * @return the resource collection */ public Nodes nodes() { return new Nodes(); } /** * The "nodes" collection of methods. */ public class Nodes { /** * Creates a node. * * Create a request for the method "nodes.create". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. The parent resource name. * @param content the {@link com.google.api.services.tpu.v2.model.Node} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.tpu.v2.model.Node content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends TPURequest { private static final String REST_PATH = "v2/{+parent}/nodes"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Creates a node. * * Create a request for the method "nodes.create". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation.

{@link * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent resource name. * @param content the {@link com.google.api.services.tpu.v2.model.Node} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.tpu.v2.model.Node content) { super(TPU.this, "POST", REST_PATH, content, com.google.api.services.tpu.v2.model.Operation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public Create set$Xgafv(java.lang.String $Xgafv) { return (Create) super.set$Xgafv($Xgafv); } @Override public Create setAccessToken(java.lang.String accessToken) { return (Create) super.setAccessToken(accessToken); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @Override public Create setCallback(java.lang.String callback) { return (Create) super.setCallback(callback); } @Override public Create setFields(java.lang.String fields) { return (Create) super.setFields(fields); } @Override public Create setKey(java.lang.String key) { return (Create) super.setKey(key); } @Override public Create setOauthToken(java.lang.String oauthToken) { return (Create) super.setOauthToken(oauthToken); } @Override public Create setPrettyPrint(java.lang.Boolean prettyPrint) { return (Create) super.setPrettyPrint(prettyPrint); } @Override public Create setQuotaUser(java.lang.String quotaUser) { return (Create) super.setQuotaUser(quotaUser); } @Override public Create setUploadType(java.lang.String uploadType) { return (Create) super.setUploadType(uploadType); } @Override public Create setUploadProtocol(java.lang.String uploadProtocol) { return (Create) super.setUploadProtocol(uploadProtocol); } /** Required. The parent resource name. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent resource name. */ public java.lang.String getParent() { return parent; } /** Required. The parent resource name. */ public Create setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** The unqualified resource name. */ @com.google.api.client.util.Key private java.lang.String nodeId; /** The unqualified resource name. */ public java.lang.String getNodeId() { return nodeId; } /** The unqualified resource name. */ public Create setNodeId(java.lang.String nodeId) { this.nodeId = nodeId; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes a node. * * Create a request for the method "nodes.delete". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. The resource name. * @return the request */ public Delete delete(java.lang.String name) throws java.io.IOException { Delete result = new Delete(name); initialize(result); return result; } public class Delete extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); /** * Deletes a node. * * Create a request for the method "nodes.delete". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

{@link * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name Required. The resource name. * @since 1.13 */ protected Delete(java.lang.String name) { super(TPU.this, "DELETE", REST_PATH, null, com.google.api.services.tpu.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @Override public Delete setFields(java.lang.String fields) { return (Delete) super.setFields(fields); } @Override public Delete setKey(java.lang.String key) { return (Delete) super.setKey(key); } @Override public Delete setOauthToken(java.lang.String oauthToken) { return (Delete) super.setOauthToken(oauthToken); } @Override public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Delete) super.setPrettyPrint(prettyPrint); } @Override public Delete setQuotaUser(java.lang.String quotaUser) { return (Delete) super.setQuotaUser(quotaUser); } @Override public Delete setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** Required. The resource name. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name. */ public java.lang.String getName() { return name; } /** Required. The resource name. */ public Delete setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } this.name = name; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets the details of a node. * * Create a request for the method "nodes.get". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Required. The resource name. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); /** * Gets the details of a node. * * Create a request for the method "nodes.get". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name Required. The resource name. * @since 1.13 */ protected Get(java.lang.String name) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.Node.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Required. The resource name. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name. */ public java.lang.String getName() { return name; } /** Required. The resource name. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves the guest attributes for the node. * * Create a request for the method "nodes.getGuestAttributes". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link GetGuestAttributes#execute()} method to invoke the remote operation. * * @param name Required. The resource name. * @param content the {@link com.google.api.services.tpu.v2.model.GetGuestAttributesRequest} * @return the request */ public GetGuestAttributes getGuestAttributes(java.lang.String name, com.google.api.services.tpu.v2.model.GetGuestAttributesRequest content) throws java.io.IOException { GetGuestAttributes result = new GetGuestAttributes(name, content); initialize(result); return result; } public class GetGuestAttributes extends TPURequest { private static final String REST_PATH = "v2/{+name}:getGuestAttributes"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); /** * Retrieves the guest attributes for the node. * * Create a request for the method "nodes.getGuestAttributes". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link GetGuestAttributes#execute()} method to invoke the remote * operation.

{@link GetGuestAttributes#initialize(com.google.api.client.googleapis.services.A * bstractGoogleClientRequest)} must be called to initialize this instance immediately after * invoking the constructor.

* * @param name Required. The resource name. * @param content the {@link com.google.api.services.tpu.v2.model.GetGuestAttributesRequest} * @since 1.13 */ protected GetGuestAttributes(java.lang.String name, com.google.api.services.tpu.v2.model.GetGuestAttributesRequest content) { super(TPU.this, "POST", REST_PATH, content, com.google.api.services.tpu.v2.model.GetGuestAttributesResponse.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } } @Override public GetGuestAttributes set$Xgafv(java.lang.String $Xgafv) { return (GetGuestAttributes) super.set$Xgafv($Xgafv); } @Override public GetGuestAttributes setAccessToken(java.lang.String accessToken) { return (GetGuestAttributes) super.setAccessToken(accessToken); } @Override public GetGuestAttributes setAlt(java.lang.String alt) { return (GetGuestAttributes) super.setAlt(alt); } @Override public GetGuestAttributes setCallback(java.lang.String callback) { return (GetGuestAttributes) super.setCallback(callback); } @Override public GetGuestAttributes setFields(java.lang.String fields) { return (GetGuestAttributes) super.setFields(fields); } @Override public GetGuestAttributes setKey(java.lang.String key) { return (GetGuestAttributes) super.setKey(key); } @Override public GetGuestAttributes setOauthToken(java.lang.String oauthToken) { return (GetGuestAttributes) super.setOauthToken(oauthToken); } @Override public GetGuestAttributes setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetGuestAttributes) super.setPrettyPrint(prettyPrint); } @Override public GetGuestAttributes setQuotaUser(java.lang.String quotaUser) { return (GetGuestAttributes) super.setQuotaUser(quotaUser); } @Override public GetGuestAttributes setUploadType(java.lang.String uploadType) { return (GetGuestAttributes) super.setUploadType(uploadType); } @Override public GetGuestAttributes setUploadProtocol(java.lang.String uploadProtocol) { return (GetGuestAttributes) super.setUploadProtocol(uploadProtocol); } /** Required. The resource name. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name. */ public java.lang.String getName() { return name; } /** Required. The resource name. */ public GetGuestAttributes setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } this.name = name; return this; } @Override public GetGuestAttributes set(String parameterName, Object value) { return (GetGuestAttributes) super.set(parameterName, value); } } /** * Lists nodes. * * Create a request for the method "nodes.list". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The parent resource name. * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends TPURequest { private static final String REST_PATH = "v2/{+parent}/nodes"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists nodes. * * Create a request for the method "nodes.list". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent resource name. * @since 1.13 */ protected List(java.lang.String parent) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.ListNodesResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Required. The parent resource name. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent resource name. */ public java.lang.String getParent() { return parent; } /** Required. The parent resource name. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** The maximum number of items to return. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of items to return. */ public java.lang.Integer getPageSize() { return pageSize; } /** The maximum number of items to return. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** The next_page_token value returned from a previous List request, if any. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The next_page_token value returned from a previous List request, if any. */ public java.lang.String getPageToken() { return pageToken; } /** The next_page_token value returned from a previous List request, if any. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the configurations of a node. * * Create a request for the method "nodes.patch". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param name Output only. Immutable. The name of the TPU. * @param content the {@link com.google.api.services.tpu.v2.model.Node} * @return the request */ public Patch patch(java.lang.String name, com.google.api.services.tpu.v2.model.Node content) throws java.io.IOException { Patch result = new Patch(name, content); initialize(result); return result; } public class Patch extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); /** * Updates the configurations of a node. * * Create a request for the method "nodes.patch". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation.

{@link * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name Output only. Immutable. The name of the TPU. * @param content the {@link com.google.api.services.tpu.v2.model.Node} * @since 1.13 */ protected Patch(java.lang.String name, com.google.api.services.tpu.v2.model.Node content) { super(TPU.this, "PATCH", REST_PATH, content, com.google.api.services.tpu.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @Override public Patch setFields(java.lang.String fields) { return (Patch) super.setFields(fields); } @Override public Patch setKey(java.lang.String key) { return (Patch) super.setKey(key); } @Override public Patch setOauthToken(java.lang.String oauthToken) { return (Patch) super.setOauthToken(oauthToken); } @Override public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Patch) super.setPrettyPrint(prettyPrint); } @Override public Patch setQuotaUser(java.lang.String quotaUser) { return (Patch) super.setQuotaUser(quotaUser); } @Override public Patch setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** Output only. Immutable. The name of the TPU. */ @com.google.api.client.util.Key private java.lang.String name; /** Output only. Immutable. The name of the TPU. */ public java.lang.String getName() { return name; } /** Output only. Immutable. The name of the TPU. */ public Patch setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } this.name = name; return this; } /** * Required. Mask of fields from Node to update. Supported fields: [description, tags, * labels, metadata, network_config.enable_external_ips]. */ @com.google.api.client.util.Key private String updateMask; /** Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips]. */ public String getUpdateMask() { return updateMask; } /** * Required. Mask of fields from Node to update. Supported fields: [description, tags, * labels, metadata, network_config.enable_external_ips]. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Starts a node. * * Create a request for the method "nodes.start". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Start#execute()} method to invoke the remote operation. * * @param name Required. The resource name. * @param content the {@link com.google.api.services.tpu.v2.model.StartNodeRequest} * @return the request */ public Start start(java.lang.String name, com.google.api.services.tpu.v2.model.StartNodeRequest content) throws java.io.IOException { Start result = new Start(name, content); initialize(result); return result; } public class Start extends TPURequest { private static final String REST_PATH = "v2/{+name}:start"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); /** * Starts a node. * * Create a request for the method "nodes.start". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Start#execute()} method to invoke the remote operation.

{@link * Start#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name Required. The resource name. * @param content the {@link com.google.api.services.tpu.v2.model.StartNodeRequest} * @since 1.13 */ protected Start(java.lang.String name, com.google.api.services.tpu.v2.model.StartNodeRequest content) { super(TPU.this, "POST", REST_PATH, content, com.google.api.services.tpu.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } } @Override public Start set$Xgafv(java.lang.String $Xgafv) { return (Start) super.set$Xgafv($Xgafv); } @Override public Start setAccessToken(java.lang.String accessToken) { return (Start) super.setAccessToken(accessToken); } @Override public Start setAlt(java.lang.String alt) { return (Start) super.setAlt(alt); } @Override public Start setCallback(java.lang.String callback) { return (Start) super.setCallback(callback); } @Override public Start setFields(java.lang.String fields) { return (Start) super.setFields(fields); } @Override public Start setKey(java.lang.String key) { return (Start) super.setKey(key); } @Override public Start setOauthToken(java.lang.String oauthToken) { return (Start) super.setOauthToken(oauthToken); } @Override public Start setPrettyPrint(java.lang.Boolean prettyPrint) { return (Start) super.setPrettyPrint(prettyPrint); } @Override public Start setQuotaUser(java.lang.String quotaUser) { return (Start) super.setQuotaUser(quotaUser); } @Override public Start setUploadType(java.lang.String uploadType) { return (Start) super.setUploadType(uploadType); } @Override public Start setUploadProtocol(java.lang.String uploadProtocol) { return (Start) super.setUploadProtocol(uploadProtocol); } /** Required. The resource name. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name. */ public java.lang.String getName() { return name; } /** Required. The resource name. */ public Start setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } this.name = name; return this; } @Override public Start set(String parameterName, Object value) { return (Start) super.set(parameterName, value); } } /** * Stops a node. This operation is only available with single TPU nodes. * * Create a request for the method "nodes.stop". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Stop#execute()} method to invoke the remote operation. * * @param name Required. The resource name. * @param content the {@link com.google.api.services.tpu.v2.model.StopNodeRequest} * @return the request */ public Stop stop(java.lang.String name, com.google.api.services.tpu.v2.model.StopNodeRequest content) throws java.io.IOException { Stop result = new Stop(name, content); initialize(result); return result; } public class Stop extends TPURequest { private static final String REST_PATH = "v2/{+name}:stop"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); /** * Stops a node. This operation is only available with single TPU nodes. * * Create a request for the method "nodes.stop". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Stop#execute()} method to invoke the remote operation.

{@link * Stop#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name Required. The resource name. * @param content the {@link com.google.api.services.tpu.v2.model.StopNodeRequest} * @since 1.13 */ protected Stop(java.lang.String name, com.google.api.services.tpu.v2.model.StopNodeRequest content) { super(TPU.this, "POST", REST_PATH, content, com.google.api.services.tpu.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } } @Override public Stop set$Xgafv(java.lang.String $Xgafv) { return (Stop) super.set$Xgafv($Xgafv); } @Override public Stop setAccessToken(java.lang.String accessToken) { return (Stop) super.setAccessToken(accessToken); } @Override public Stop setAlt(java.lang.String alt) { return (Stop) super.setAlt(alt); } @Override public Stop setCallback(java.lang.String callback) { return (Stop) super.setCallback(callback); } @Override public Stop setFields(java.lang.String fields) { return (Stop) super.setFields(fields); } @Override public Stop setKey(java.lang.String key) { return (Stop) super.setKey(key); } @Override public Stop setOauthToken(java.lang.String oauthToken) { return (Stop) super.setOauthToken(oauthToken); } @Override public Stop setPrettyPrint(java.lang.Boolean prettyPrint) { return (Stop) super.setPrettyPrint(prettyPrint); } @Override public Stop setQuotaUser(java.lang.String quotaUser) { return (Stop) super.setQuotaUser(quotaUser); } @Override public Stop setUploadType(java.lang.String uploadType) { return (Stop) super.setUploadType(uploadType); } @Override public Stop setUploadProtocol(java.lang.String uploadProtocol) { return (Stop) super.setUploadProtocol(uploadProtocol); } /** Required. The resource name. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name. */ public java.lang.String getName() { return name; } /** Required. The resource name. */ public Stop setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$"); } this.name = name; return this; } @Override public Stop set(String parameterName, Object value) { return (Stop) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Operations collection. * *

The typical use is:

*
       *   {@code TPU tpu = new TPU(...);}
       *   {@code TPU.Operations.List request = tpu.operations().list(parameters ...)}
       * 
* * @return the resource collection */ public Operations operations() { return new Operations(); } /** * The "operations" collection of methods. */ public class Operations { /** * 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`. * * Create a request for the method "operations.cancel". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Cancel#execute()} method to invoke the remote operation. * * @param name The name of the operation resource to be cancelled. * @return the request */ public Cancel cancel(java.lang.String name) throws java.io.IOException { Cancel result = new Cancel(name); initialize(result); return result; } public class Cancel extends TPURequest { private static final String REST_PATH = "v2/{+name}:cancel"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); /** * 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`. * * Create a request for the method "operations.cancel". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Cancel#execute()} method to invoke the remote operation.

{@link * Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation resource to be cancelled. * @since 1.13 */ protected Cancel(java.lang.String name) { super(TPU.this, "POST", REST_PATH, null, com.google.api.services.tpu.v2.model.Empty.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } } @Override public Cancel set$Xgafv(java.lang.String $Xgafv) { return (Cancel) super.set$Xgafv($Xgafv); } @Override public Cancel setAccessToken(java.lang.String accessToken) { return (Cancel) super.setAccessToken(accessToken); } @Override public Cancel setAlt(java.lang.String alt) { return (Cancel) super.setAlt(alt); } @Override public Cancel setCallback(java.lang.String callback) { return (Cancel) super.setCallback(callback); } @Override public Cancel setFields(java.lang.String fields) { return (Cancel) super.setFields(fields); } @Override public Cancel setKey(java.lang.String key) { return (Cancel) super.setKey(key); } @Override public Cancel setOauthToken(java.lang.String oauthToken) { return (Cancel) super.setOauthToken(oauthToken); } @Override public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) { return (Cancel) super.setPrettyPrint(prettyPrint); } @Override public Cancel setQuotaUser(java.lang.String quotaUser) { return (Cancel) super.setQuotaUser(quotaUser); } @Override public Cancel setUploadType(java.lang.String uploadType) { return (Cancel) super.setUploadType(uploadType); } @Override public Cancel setUploadProtocol(java.lang.String uploadProtocol) { return (Cancel) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource to be cancelled. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource to be cancelled. */ public java.lang.String getName() { return name; } /** The name of the operation resource to be cancelled. */ public Cancel setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Cancel set(String parameterName, Object value) { return (Cancel) super.set(parameterName, value); } } /** * 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`. * * Create a request for the method "operations.delete". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name The name of the operation resource to be deleted. * @return the request */ public Delete delete(java.lang.String name) throws java.io.IOException { Delete result = new Delete(name); initialize(result); return result; } public class Delete extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); /** * 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`. * * Create a request for the method "operations.delete". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

{@link * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation resource to be deleted. * @since 1.13 */ protected Delete(java.lang.String name) { super(TPU.this, "DELETE", REST_PATH, null, com.google.api.services.tpu.v2.model.Empty.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @Override public Delete setFields(java.lang.String fields) { return (Delete) super.setFields(fields); } @Override public Delete setKey(java.lang.String key) { return (Delete) super.setKey(key); } @Override public Delete setOauthToken(java.lang.String oauthToken) { return (Delete) super.setOauthToken(oauthToken); } @Override public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Delete) super.setPrettyPrint(prettyPrint); } @Override public Delete setQuotaUser(java.lang.String quotaUser) { return (Delete) super.setQuotaUser(quotaUser); } @Override public Delete setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource to be deleted. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource to be deleted. */ public java.lang.String getName() { return name; } /** The name of the operation resource to be deleted. */ public Delete setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * 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. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name The name of the operation resource. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); /** * 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. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation resource. * @since 1.13 */ protected Get(java.lang.String name) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource. */ public java.lang.String getName() { return name; } /** The name of the operation resource. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists operations that match the specified filter in the request. If the server doesn't support * this method, it returns `UNIMPLEMENTED`. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param name The name of the operation's parent resource. * @return the request */ public List list(java.lang.String name) throws java.io.IOException { List result = new List(name); initialize(result); return result; } public class List extends TPURequest { private static final String REST_PATH = "v2/{+name}/operations"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists operations that match the specified filter in the request. If the server doesn't support * this method, it returns `UNIMPLEMENTED`. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation's parent resource. * @since 1.13 */ protected List(java.lang.String name) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.ListOperationsResponse.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** The name of the operation's parent resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation's parent resource. */ public java.lang.String getName() { return name; } /** The name of the operation's parent resource. */ public List setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.name = name; return this; } /** The standard list filter. */ @com.google.api.client.util.Key private java.lang.String filter; /** The standard list filter. */ public java.lang.String getFilter() { return filter; } /** The standard list filter. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** The standard list page size. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The standard list page size. */ public java.lang.Integer getPageSize() { return pageSize; } /** The standard list page size. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** The standard list page token. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The standard list page token. */ public java.lang.String getPageToken() { return pageToken; } /** The standard list page token. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the QueuedResources collection. * *

The typical use is:

*
       *   {@code TPU tpu = new TPU(...);}
       *   {@code TPU.QueuedResources.List request = tpu.queuedResources().list(parameters ...)}
       * 
* * @return the resource collection */ public QueuedResources queuedResources() { return new QueuedResources(); } /** * The "queuedResources" collection of methods. */ public class QueuedResources { /** * Creates a QueuedResource TPU instance. * * Create a request for the method "queuedResources.create". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. The parent resource name. * @param content the {@link com.google.api.services.tpu.v2.model.QueuedResource} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.tpu.v2.model.QueuedResource content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends TPURequest { private static final String REST_PATH = "v2/{+parent}/queuedResources"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Creates a QueuedResource TPU instance. * * Create a request for the method "queuedResources.create". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation.

{@link * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent resource name. * @param content the {@link com.google.api.services.tpu.v2.model.QueuedResource} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.tpu.v2.model.QueuedResource content) { super(TPU.this, "POST", REST_PATH, content, com.google.api.services.tpu.v2.model.Operation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public Create set$Xgafv(java.lang.String $Xgafv) { return (Create) super.set$Xgafv($Xgafv); } @Override public Create setAccessToken(java.lang.String accessToken) { return (Create) super.setAccessToken(accessToken); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @Override public Create setCallback(java.lang.String callback) { return (Create) super.setCallback(callback); } @Override public Create setFields(java.lang.String fields) { return (Create) super.setFields(fields); } @Override public Create setKey(java.lang.String key) { return (Create) super.setKey(key); } @Override public Create setOauthToken(java.lang.String oauthToken) { return (Create) super.setOauthToken(oauthToken); } @Override public Create setPrettyPrint(java.lang.Boolean prettyPrint) { return (Create) super.setPrettyPrint(prettyPrint); } @Override public Create setQuotaUser(java.lang.String quotaUser) { return (Create) super.setQuotaUser(quotaUser); } @Override public Create setUploadType(java.lang.String uploadType) { return (Create) super.setUploadType(uploadType); } @Override public Create setUploadProtocol(java.lang.String uploadProtocol) { return (Create) super.setUploadProtocol(uploadProtocol); } /** Required. The parent resource name. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent resource name. */ public java.lang.String getParent() { return parent; } /** Required. The parent resource name. */ public Create setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** * Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex * format. */ @com.google.api.client.util.Key private java.lang.String queuedResourceId; /** Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. */ public java.lang.String getQueuedResourceId() { return queuedResourceId; } /** * Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex * format. */ public Create setQueuedResourceId(java.lang.String queuedResourceId) { this.queuedResourceId = queuedResourceId; return this; } /** Optional. Idempotent request UUID. */ @com.google.api.client.util.Key private java.lang.String requestId; /** Optional. Idempotent request UUID. */ public java.lang.String getRequestId() { return requestId; } /** Optional. Idempotent request UUID. */ public Create setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes a QueuedResource TPU instance. * * Create a request for the method "queuedResources.delete". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. The resource name. * @return the request */ public Delete delete(java.lang.String name) throws java.io.IOException { Delete result = new Delete(name); initialize(result); return result; } public class Delete extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$"); /** * Deletes a QueuedResource TPU instance. * * Create a request for the method "queuedResources.delete". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

{@link * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name Required. The resource name. * @since 1.13 */ protected Delete(java.lang.String name) { super(TPU.this, "DELETE", REST_PATH, null, com.google.api.services.tpu.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$"); } } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @Override public Delete setFields(java.lang.String fields) { return (Delete) super.setFields(fields); } @Override public Delete setKey(java.lang.String key) { return (Delete) super.setKey(key); } @Override public Delete setOauthToken(java.lang.String oauthToken) { return (Delete) super.setOauthToken(oauthToken); } @Override public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Delete) super.setPrettyPrint(prettyPrint); } @Override public Delete setQuotaUser(java.lang.String quotaUser) { return (Delete) super.setQuotaUser(quotaUser); } @Override public Delete setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** Required. The resource name. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name. */ public java.lang.String getName() { return name; } /** Required. The resource name. */ public Delete setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$"); } this.name = name; return this; } /** * 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. */ @com.google.api.client.util.Key private java.lang.Boolean force; /** 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. */ public java.lang.Boolean getForce() { return force; } /** * 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. */ public Delete setForce(java.lang.Boolean force) { this.force = force; return this; } /** Optional. Idempotent request UUID. */ @com.google.api.client.util.Key private java.lang.String requestId; /** Optional. Idempotent request UUID. */ public java.lang.String getRequestId() { return requestId; } /** Optional. Idempotent request UUID. */ public Delete setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets details of a queued resource. * * Create a request for the method "queuedResources.get". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Required. The resource name. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$"); /** * Gets details of a queued resource. * * Create a request for the method "queuedResources.get". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name Required. The resource name. * @since 1.13 */ protected Get(java.lang.String name) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.QueuedResource.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Required. The resource name. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name. */ public java.lang.String getName() { return name; } /** Required. The resource name. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists queued resources. * * Create a request for the method "queuedResources.list". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The parent resource name. * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends TPURequest { private static final String REST_PATH = "v2/{+parent}/queuedResources"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists queued resources. * * Create a request for the method "queuedResources.list". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent resource name. * @since 1.13 */ protected List(java.lang.String parent) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.ListQueuedResourcesResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Required. The parent resource name. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent resource name. */ public java.lang.String getParent() { return parent; } /** Required. The parent resource name. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** Optional. The maximum number of items to return. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Optional. The maximum number of items to return. */ public java.lang.Integer getPageSize() { return pageSize; } /** Optional. The maximum number of items to return. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** Optional. The next_page_token value returned from a previous List request, if any. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Optional. The next_page_token value returned from a previous List request, if any. */ public java.lang.String getPageToken() { return pageToken; } /** Optional. The next_page_token value returned from a previous List request, if any. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Resets a QueuedResource TPU instance * * Create a request for the method "queuedResources.reset". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Reset#execute()} method to invoke the remote operation. * * @param name Required. The name of the queued resource. * @param content the {@link com.google.api.services.tpu.v2.model.ResetQueuedResourceRequest} * @return the request */ public Reset reset(java.lang.String name, com.google.api.services.tpu.v2.model.ResetQueuedResourceRequest content) throws java.io.IOException { Reset result = new Reset(name, content); initialize(result); return result; } public class Reset extends TPURequest { private static final String REST_PATH = "v2/{+name}:reset"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$"); /** * Resets a QueuedResource TPU instance * * Create a request for the method "queuedResources.reset". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Reset#execute()} method to invoke the remote operation.

{@link * Reset#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name Required. The name of the queued resource. * @param content the {@link com.google.api.services.tpu.v2.model.ResetQueuedResourceRequest} * @since 1.13 */ protected Reset(java.lang.String name, com.google.api.services.tpu.v2.model.ResetQueuedResourceRequest content) { super(TPU.this, "POST", REST_PATH, content, com.google.api.services.tpu.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$"); } } @Override public Reset set$Xgafv(java.lang.String $Xgafv) { return (Reset) super.set$Xgafv($Xgafv); } @Override public Reset setAccessToken(java.lang.String accessToken) { return (Reset) super.setAccessToken(accessToken); } @Override public Reset setAlt(java.lang.String alt) { return (Reset) super.setAlt(alt); } @Override public Reset setCallback(java.lang.String callback) { return (Reset) super.setCallback(callback); } @Override public Reset setFields(java.lang.String fields) { return (Reset) super.setFields(fields); } @Override public Reset setKey(java.lang.String key) { return (Reset) super.setKey(key); } @Override public Reset setOauthToken(java.lang.String oauthToken) { return (Reset) super.setOauthToken(oauthToken); } @Override public Reset setPrettyPrint(java.lang.Boolean prettyPrint) { return (Reset) super.setPrettyPrint(prettyPrint); } @Override public Reset setQuotaUser(java.lang.String quotaUser) { return (Reset) super.setQuotaUser(quotaUser); } @Override public Reset setUploadType(java.lang.String uploadType) { return (Reset) super.setUploadType(uploadType); } @Override public Reset setUploadProtocol(java.lang.String uploadProtocol) { return (Reset) super.setUploadProtocol(uploadProtocol); } /** Required. The name of the queued resource. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The name of the queued resource. */ public java.lang.String getName() { return name; } /** Required. The name of the queued resource. */ public Reset setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$"); } this.name = name; return this; } @Override public Reset set(String parameterName, Object value) { return (Reset) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RuntimeVersions collection. * *

The typical use is:

*
       *   {@code TPU tpu = new TPU(...);}
       *   {@code TPU.RuntimeVersions.List request = tpu.runtimeVersions().list(parameters ...)}
       * 
* * @return the resource collection */ public RuntimeVersions runtimeVersions() { return new RuntimeVersions(); } /** * The "runtimeVersions" collection of methods. */ public class RuntimeVersions { /** * Gets a runtime version. * * Create a request for the method "runtimeVersions.get". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Required. The resource name. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends TPURequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/runtimeVersions/[^/]+$"); /** * Gets a runtime version. * * Create a request for the method "runtimeVersions.get". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name Required. The resource name. * @since 1.13 */ protected Get(java.lang.String name) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.RuntimeVersion.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/runtimeVersions/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Required. The resource name. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name. */ public java.lang.String getName() { return name; } /** Required. The resource name. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/runtimeVersions/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists runtime versions supported by this API. * * Create a request for the method "runtimeVersions.list". * * This request holds the parameters needed by the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The parent resource name. * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends TPURequest { private static final String REST_PATH = "v2/{+parent}/runtimeVersions"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists runtime versions supported by this API. * * Create a request for the method "runtimeVersions.list". * * This request holds the parameters needed by the the tpu server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent resource name. * @since 1.13 */ protected List(java.lang.String parent) { super(TPU.this, "GET", REST_PATH, null, com.google.api.services.tpu.v2.model.ListRuntimeVersionsResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Required. The parent resource name. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent resource name. */ public java.lang.String getParent() { return parent; } /** Required. The parent resource name. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** List filter. */ @com.google.api.client.util.Key private java.lang.String filter; /** List filter. */ public java.lang.String getFilter() { return filter; } /** List filter. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** Sort results. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sort results. */ public java.lang.String getOrderBy() { return orderBy; } /** Sort results. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** The maximum number of items to return. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of items to return. */ public java.lang.Integer getPageSize() { return pageSize; } /** The maximum number of items to return. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** The next_page_token value returned from a previous List request, if any. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The next_page_token value returned from a previous List request, if any. */ public java.lang.String getPageToken() { return pageToken; } /** The next_page_token value returned from a previous List request, if any. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } } } /** * Builder for {@link TPU}. * *

* Implementation is not thread-safe. *

* * @since 1.3.0 */ public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) { // If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint. // If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS. // Use the regular endpoint for all other cases. String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT"); useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint; if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoint) && transport != null && transport.isMtls())) { return DEFAULT_MTLS_ROOT_URL; } return DEFAULT_ROOT_URL; } /** * Returns an instance of a new builder. * * @param transport HTTP transport, which should normally be: *
    *
  • Google App Engine: * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • *
  • Android: {@code newCompatibleTransport} from * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} *
  • *
* @param jsonFactory JSON factory, which may be: *
    *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • *
  • Android Honeycomb or higher: * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • *
* @param httpRequestInitializer HTTP request initializer or {@code null} for none * @since 1.7 */ public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { super( transport, jsonFactory, Builder.chooseEndpoint(transport), DEFAULT_SERVICE_PATH, httpRequestInitializer, false); setBatchPath(DEFAULT_BATCH_PATH); } /** Builds a new instance of {@link TPU}. */ @Override public TPU build() { return new TPU(this); } @Override public Builder setRootUrl(String rootUrl) { return (Builder) super.setRootUrl(rootUrl); } @Override public Builder setServicePath(String servicePath) { return (Builder) super.setServicePath(servicePath); } @Override public Builder setBatchPath(String batchPath) { return (Builder) super.setBatchPath(batchPath); } @Override public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); } @Override public Builder setApplicationName(String applicationName) { return (Builder) super.setApplicationName(applicationName); } @Override public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); } @Override public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); } @Override public Builder setSuppressAllChecks(boolean suppressAllChecks) { return (Builder) super.setSuppressAllChecks(suppressAllChecks); } /** * Set the {@link TPURequestInitializer}. * * @since 1.12 */ public Builder setTPURequestInitializer( TPURequestInitializer tpuRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(tpuRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } @Override public Builder setUniverseDomain(String universeDomain) { return (Builder) super.setUniverseDomain(universeDomain); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy